Hello,
it's probably a completely silly question but, how can I set to "enabled -> true" a button or a group of such elements to have it active after the dismiss of my splash screen ?
Or, in an other way, having a taskwindow menus elements enabled to "false" during the splash is visible and set to active when it disappear ?
My medical expert system is growing, fine and beautiful, but I am working to avoid the few mistakes the user can do... double click or so before everything is OK and databases are initialized...
Looking at some posts in the forum, it appear that the "best" (???) solution is to have the same two buttons and to set one of them visible when it is time to change the status from one to the other...
Michel, from France,
Regards
-
Michel
- Posts: 8
- Joined: 8 Nov 2025 17:17
-
Harrison Pratt
- VIP Member
- Posts: 467
- Joined: 5 Nov 2000 0:01
Re: buttons ( and others ) enabled true ans false prgrammaticly
When creating or modifying a pushbutton with the IDE control editor for a form or dialog, look for the Enabled Property, which you can set to <default>, true, or false. This modifies the generatedInitialize() code to change the button behavior defined in generatedInitialize(), for example:
You can set the initial Property in the constructor after generatedInitialize() [/b]or in the onShow/1 clause. Likewise, you can change it in response some event, such as pushing a different button or selecting a listbox item.
%------------------------------------------------------------------------------
%
If you want to change the TaskWindow menu behavior, you can use the menuEnable/2 predicates. The example below enables the Edit | Copy menu item.
You can easily find the menu resource identifiers with the TaskMenu editor.
Code: Select all
pushButton_ctl:setEnabled(true) % pushButton_clt represents the name of your buttonYou can set the initial Property in the constructor after generatedInitialize() [/b]or in the onShow/1 clause. Likewise, you can change it in response some event, such as pushing a different button or selecting a listbox item.
%------------------------------------------------------------------------------
%
If you want to change the TaskWindow menu behavior, you can use the menuEnable/2 predicates. The example below enables the Edit | Copy menu item.
You can easily find the menu resource identifiers with the TaskMenu editor.
Code: Select all
predicates
onShow : window::showListener.
clauses
onShow(_, _CreationData) :-
menuEnable(resourceIdentifiers::id_edit_copy, true),
_MessageForm = messageForm::display(This).-
Michel
- Posts: 8
- Joined: 8 Nov 2025 17:17
Re: buttons ( and others ) enabled true ans false prgrammaticly
Hi,
thanks for such an answer. I think it will help me to get what I need. I am an old user of "Turbo Prolog", but VP is so much powerfull it seems to be a new world for me
Warm regards
thanks for such an answer. I think it will help me to get what I need. I am an old user of "Turbo Prolog", but VP is so much powerfull it seems to be a new world for me
Warm regards
-
Harrison Pratt
- VIP Member
- Posts: 467
- Joined: 5 Nov 2000 0:01
Re: buttons ( and others ) enabled true ans false prgrammaticly
I also started out on Borland's Turbo Prolog running on MS-DOS. It was simpler to use because there was so much less available to use. 
-
Michel
- Posts: 8
- Joined: 8 Nov 2025 17:17
