Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, November 27, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: TCheckBox Enable/Disable issue
Luc
Posts: 4
 
TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 10:12 AM
fiogf49gjkf0d
HI all:
I'm trying to use a check box and part of my requirement is to be able to enable/disable the control based on specific criterias. That property, however, does not seem to work and, there does not seem to be a ReadOnly property I could use. Has anyone found a solution/work around for this issue?

Tanks in advance
[Reply][Quote]
Thomas Aussem
Posts: 57
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 12:10 PM
fiogf49gjkf0d
Hi Luc,

I hope my understanding of your problem is correct: you can enable/disable a Checkbox control with Checkbox.Enabled = TRUE or CheckBox.Enabled = FALSE (to disable it). I found no problems on my SLX version 6.2.3. Maybe there is an other error in your script.

Maybe you should post your code.

Best regards,
Thomas
[Reply][Quote]
Luc
Posts: 4
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 12:16 PM
fiogf49gjkf0d
Hi Thomas, thanks for your reply. I later found that the error was not a defect on the control itself. Rather, it was the delay it takes the form to load. I believe the form load event fires before all of the controls have been 'loaded'. This, I believe, is causing the code to disable the control before it gets loaded with the default of "Enabled = True". I have added a timer to wait 300 milliseconds before it disables the form and it seems to be OK now. It's kind of a bogus fix but it works.
FYI: I am using version 6.2.3.1156
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 1:41 PM
fiogf49gjkf0d
Try using OnChange. This event occurs after all of the form's controls are created and database values are passed to the binded properties. As a general rule, I stick to using OnChange versus OnCreate. OnCreate is almost never necessary, as you never really need to inject control code that high up into the loading process.
[Reply][Quote]
Luc
Posts: 4
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 07 3:58 PM
fiogf49gjkf0d
Thanks!! I'll give that a try! (:
[Reply][Quote]
LaNae Christenson
Posts: 23
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Feb 07 6:42 AM
fiogf49gjkf0d
Actually, the only way that I have found to truly control the read-only aspect of a checkbox is to put it on a small panel, then control the read-only of the panel itself. BTW, when you deselect enabled, the checkbox is grayed out and hard to read. By using the panel's read-only property, you can still easily see the value in the checkbox without the ability to change it when the panel's read-only property is true. You can change change panel's bevel properties to none so that it is virtually invisible to the user.

Regards, LaNae
[Reply][Quote]
Luc
Posts: 4
 
Re: TCheckBox Enable/Disable issueYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Feb 07 8:21 AM
fiogf49gjkf0d
Thanks, I'll keep that in mind next time I run into a similar issue. (:
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/27/2024 4:40:23 AM