I have a dialog with six Edit boxes and Labels that I may or may not want displayed depening upon conditions.
With the labels it is easy I can place a space in them and they are hidden. I cannot seem to figure out a way to elmininate the Edit box. (I saw the post about moving them out of the way - but I am not displaying and hiding them, I dont' need them at all.
If someone could post an easy example if it can be done, that would be very helpful.
My alternative is to create six different dialogs and place them in six subroutines and load the dialog by calling the subroutine. The downside is that when I want to make a change I have to edit all six boxes.
Build Dialog on Conditions
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Use SetDialogObjectVisible
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Here are a couple of examples. Try using this and then setting the 0 and the end to 1 and run it again. So basically you can use multiple lines like this just before the "Show>Dialog1,s"
SetDialogObjectVisible>Dialog1,msCheckBox4,0
This makes the Object visible or not rather than leaves it visible but stops it being used.
In the second example you can change the 0 to 1 at the end of the
LibFunc and make the checkbox unusable but still visable.
Hope these help.
SetDialogObjectVisible>Dialog1,msCheckBox4,0
This makes the Object visible or not rather than leaves it visible but stops it being used.
In the second example you can change the 0 to 1 at the end of the
LibFunc and make the checkbox unusable but still visable.
Hope these help.
Code: Select all
Dialog>Dialog1
Caption=Control Events Panel
Width=391
Height=385
Top=220
Left=501
Max=1
Min=1
Close=1
Resize=1
CheckBox=msCheckBox1,Connect to remote server.,96,72,179,True
CheckBox=msCheckBox3,Transfer Files to remote server.,96,128,218,False
CheckBox=msCheckBox5,Restart Services on remote server.,96,192,191,False
CheckBox=msCheckBox6,Diconnect from remote server.,96,224,185,True
Label=Process options,64,32,true
CheckBox=msCheckBox4,Backout to original files on remote server.,97,159,192,False
Button=Go,96,256,75,25,1
Button=Cancel,208,256,75,25,2
CheckBox=msCheckBox2,Backup current files before transfer.,98,99,207,True
EndDialog>Dialog1
SetDialogObjectVisible>Dialog1,msCheckBox4,0
Show>Dialog1,s
Code: Select all
Dialog>Dialog1
Caption=Control Events Panel
Width=391
Height=385
Top=220
Left=501
Max=1
Min=1
Close=1
Resize=1
CheckBox=msCheckBox1,Connect to remote server.,96,72,179,True
CheckBox=msCheckBox3,Transfer Files to remote server.,96,128,218,False
CheckBox=msCheckBox5,Restart Services on remote server.,96,192,191,False
CheckBox=msCheckBox6,Diconnect from remote server.,96,224,185,True
Label=Process options,64,32,true
CheckBox=msCheckBox4,Backout to original files on remote server.,97,159,192,False
Button=Go,96,256,75,25,1
Button=Cancel,208,256,75,25,2
CheckBox=msCheckBox2,Backup current files before transfer.,98,99,207,True
EndDialog>Dialog1
LibFunc>user32,EnableWindow,lfres,Dialog1.msCheckBox4.HANDLE,0
LibFunc>user32,EnableWindow,lfres,Dialog1.msCheckBox3.HANDLE,0
LibFunc>user32,EnableWindow,lfres,Dialog1.msCheckBox5.HANDLE,0
Show>Dialog1,r
Phil.......
Hide on Dialog
Thanks,
These are fantastic examples! I finished before I was this and ended up tons of code this would have avoided.
These are fantastic examples! I finished before I was this and ended up tons of code this would have avoided.