Enabling/Disabling a button based on entry : Clarion
This is a discussion on Enabling/Disabling a button based on entry within the Clarion forums in Programming Languages category; The idea is to disable a button until an entry field has a specific entry. This has been the biggest trouble I've had so far in Clarion, because I can't manage to disable a button easily, even if it has disable in it's properties(stays enabled regardless). It is so much easier in say VB to do this very simple procedure, but it's a nightmare to even figure out how to disable the button in Clarion, let alone keep it disabled based on a condition. The basics of it is as such: If password = 'Password1' OR 'Password2' THEN ENABLE(?OkButton). The ...
| Clarion Clarion Programming |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| entry. This has been the biggest trouble I've had so far in Clarion, because I can't manage to disable a button easily, even if it has disable in it's properties(stays enabled regardless). It is so much easier in say VB to do this very simple procedure, but it's a nightmare to even figure out how to disable the button in Clarion, let alone keep it disabled based on a condition. The basics of it is as such: If password = 'Password1' OR 'Password2' THEN ENABLE(?OkButton). The OkButton calls the procedure which has a browse filter based on which password they put in. It's a quick and dirty way of making a filter based on who is viewing it without the user even realizing it. The passwords work fine, the filter works, but I can't keep the OkButton disabled as long as the entry does not match any accepted password. I've gone through pages and pages of topics here but none have answered this question. I'm sure it's something overly simple that I just haven't figured out yet. It's completely cosmetic, sure, and I have it set so the browse doesn't come up if the password doesn't match, but I'd prefer it this way. You know, for an IDE that is supposed to simplify things, it really makes the simple things harder... |
|
#2
| |||
| |||
| I do this all the time but use hide/unhide.... what results are you getting with enable/disable??? Harleyman |
|
#3
| |||
| |||
| HarleyMan wrote: > I do this all the time but use hide/unhide.... what results are you > getting with enable/disable??? > > Harleyman Depending on my method, 9 times out of 10 the button just doesn't disable. The only 2 methods I've found that will have it disabled at runtime don't work because in one method it re-enables after less than a second and the other re-enables after I tab out of the entry field, no matter what is in the field. Setting a timer to check the field didn't seem to work, as it enables the button once the timer is triggered, regardless of what is in the entry. I'm at a loss here. If setting disable on a button doesn't work, why have the option?!?! |
|
#4
| |||
| |||
| hide/unhide/enable/disable all work on buttons - hide/unhide make a button total invisable.... enable/disable grey the button.... BUT your situation sounds more like control logic problems - ie: you have the enable/disable logice in the wrong place (possible why it gets re-set immediately or in a second or two)... I code everything manually so don't know much about methods and all that.... have you placed you code inside accept update case accepted() of ?buttonname if you don't have a case accepted (there are a couple of way to code this but resutls are the same) you will get un-pridictable results.... Harleyman |
|
#5
| |||
| |||
| HarleyMan wrote: > hide/unhide/enable/disable all work on buttons - hide/unhide make a > button total invisable.... enable/disable grey the button.... BUT your > situation sounds more like control logic problems - ie: you have the > enable/disable logice in the wrong place Even if I insert ZERO code to do this, it is still enabled at runtime. The control is disabled in the design, and I checked the source for any enable events, there aren't any. By all reasoning it should never enable, but it does. I've never figured this thing out, seems to be a problem with Clarion itself. Nothing in the source triggers the enable, I set it to disable, it is still enabled. It's baffling. |
|
#6
| |||
| |||
| Do a search in code for ?OKButton probably somewhere it code it's getting enabled -- -- Leonid Chudakov chudakov@klarisoft.com Cool tools and Clarion examples at http://www.klarisoft.com "Malak" <jerubbaal@gmail.com> wrote in message news:1132094052.207822.298110@g44g2000cwa.googlegroups.com... > > HarleyMan wrote: >> hide/unhide/enable/disable all work on buttons - hide/unhide make a >> button total invisable.... enable/disable grey the button.... BUT your >> situation sounds more like control logic problems - ie: you have the >> enable/disable logice in the wrong place > > Even if I insert ZERO code to do this, it is still enabled at runtime. > The control is disabled in the design, and I checked the source for any > enable events, there aren't any. By all reasoning it should never > enable, but it does. I've never figured this thing out, seems to be a > problem with Clarion itself. Nothing in the source triggers the enable, > I set it to disable, it is still enabled. It's baffling. > |
|
#7
| |||
| |||
| Well I'm going to give up on this. It was cosmetic only for this particular application, although I've had the same trouble in several programs I've worked on. It just doesn't make any sense to have a disable property that doesn't function, and there's nowhere in the source that even enables the button... |
|
#8
| |||
| |||
| Hi Malak, Put in the Open Window embed: Disable(?OK) and in the Accepted embed point for the password entry field (before generated code), add: If UserIDEntered = 'password1' Enable(?OK) Else Disable(?OK) End je "Malak" <jerubbaal@gmail.com> wrote in message news:1132086387.671554.258960@g44g2000cwa.googlegroups.com... > The idea is to disable a button until an entry field has a specific > entry. This has been the biggest trouble I've had so far in Clarion, > because I can't manage to disable a button easily, even if it has > disable in it's properties(stays enabled regardless). It is so much > easier in say VB to do this very simple procedure, but it's a nightmare > to even figure out how to disable the button in Clarion, let alone keep > it disabled based on a condition. > > The basics of it is as such: > > If password = 'Password1' OR 'Password2' THEN ENABLE(?OkButton). > > The OkButton calls the procedure which has a browse filter based on > which password they put in. It's a quick and dirty way of making a > filter based on who is viewing it without the user even realizing it. > The passwords work fine, the filter works, but I can't keep the > OkButton disabled as long as the entry does not match any accepted > password. > > I've gone through pages and pages of topics here but none have answered > this question. I'm sure it's something overly simple that I just > haven't figured out yet. It's completely cosmetic, sure, and I have it > set so the browse doesn't come up if the password doesn't match, but > I'd prefer it this way. > > You know, for an IDE that is supposed to simplify things, it really > makes the simple things harder... > |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| GUI enabling/disabling design pattern | usenet | Object | 5 | 06-21-2007 06:07 AM |
| Disabling SSL2.0 and enabling 3.0 or TLS1.0 | usenet | Inetserver | 2 | 06-15-2007 07:03 AM |
| Enabling/disabling SSL via script | usenet | Inetserver | 3 | 04-25-2007 02:16 PM |
| ADO Record over EXOLEDB BUG REPORT during Event Registration Enabling/disabling | usenet | Microsoft Exchange | 0 | 03-24-2005 10:58 PM |
| checking/unchecking while enabling/disabling checkboxes | usenet | DOTNET | 1 | 05-21-2004 08:47 PM |
All times are GMT -5. The time now is 12:54 PM.


