Hi,
I have that dyalog:
MyDialogFormat=`WWWDLGED,6.2`
MyDialogCaption=`Collaboration de l'utilisateur requise`
MyDialogX=999
MyDialogY=999
MyDialogWidth=238
MyDialogHeight=288
MyDialogNumControls=008
MyDialogProcedure=`MyDialogCallbackProc`
MyDialogFont=`Microsoft Sans Serif|9728|70|34`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,226|226|226`
MyDialogConfig=0
MyDialog001=`003,003,228,012,STATICTEXT,"StaticText_2",DEFAULT,"La collaboration de l'utilisateur est requise.",DEFAULT,40,@csCenter,"Microsoft Sans Serif|9728|40|34","255|255|255","0|128|255"`
MyDialog002=`003,023,230,048,VARYTEXT,"VaryText_1",Str_PremierTexte,"PremierTexte",DEFAULT,30,@csCenter,"Microsoft Sans Serif|8192|70|34","0|0|0","253|253|253"`
MyDialog003=`001,149,232,020,VARYTEXT,"VaryText_2",Str_SecondTexte,"SecondTexte",DEFAULT,50,@csCenter,"Microsoft Sans Serif|8192|70|34","0|0|0","253|253|253"`
MyDialog004=`075,077,088,068,VARYTEXT,"VaryText_4",vtVariable1,"Vary 1",DEFAULT,60,DEFAULT,"Microsoft Sans Serif|8192|40|34","0|0|0","255|255|255"`
MyDialog005=`001,269,124,012,PUSHBUTTON,"PushButton_1",DEFAULT,"Fermer les programmes pour moi",1,70,DEFAULT,"Microsoft Sans Serif|8192|40|34",DEFAULT,DEFAULT`
MyDialog006=`155,267,054,012,PUSHBUTTON,"PushButton_2",DEFAULT,"Poursuivre",2,1,DEFAULT,"Microsoft Sans Serif|8192|40|34",DEFAULT,DEFAULT`
MyDialog007=`001,177,230,064,VARYTEXT,"VaryText_6",Str_TroisiemeTexte,"Troisieme Texte",DEFAULT,20,@csCenter,"Microsoft Sans Serif|8192|70|34","0|0|0",DEFAULT`
MyDialog008=`001,249,226,012,VARYTEXT,"VaryText_8",Str_Quatriemetexte,"Quatrieme Texte",DEFAULT,80,@csCenter|@csInvisible,"Microsoft Sans Serif|9728|70|34","255|0|0",DEFAULT`
ButtonPushed=Dialog("MyDialog")
As you see this line is invisible
MyDialog008=`001,249,226,012,VARYTEXT,"VaryText_8",Str_Quatriemetexte,"Quatrieme Texte",DEFAULT,80,@csCenter|@csInvisible,"Microsoft Sans Serif|9728|70|34","255|0|0",DEFAULT`
In my UDF, I would like making it visible once pushbutton_1 is press.
DialogControlState(MyDialog_Handle,"PushButton_1",@dcsRemStyle,???) ; Make visible - Clear the invisible bit
My problem is I don't see any constant making it visible.
Any help would be appreciate.
Thanks,
From the Consoldiated WIL Help file ( Windows Interface Language Reference->Things to Know->Dialogs->Dialog Functions->DialogControlState):
Style Meaning Controls
@csInvisible (1) Control is invisible All
and
@dcsRemStyle (4) Remove styles from a control
Just remove the @csInvisible style using @dcsRemStyle.
Hi,
You are great! It is working now. Is it possible to make an unhide text blinking?
Thanks,
Set a timer using DialogProcOptions' option @deTimer and switch the control between visible and invisible or switch the controls text between an empty string and your desired text. See
Windows Interface Language Reference->Things to Know->Dialogs->Dialog Functions->DialogProcOptions
in the help file for more details
A bit of silliness that may be of some use:
#DEFINEFUNCTION Flash(Handle,DialogMessage,DialogControlID,param4,param5)
switch (DialogMessage)
case @deInit ; Initialization
DialogProcOptions(Handle,@deTimer, 250) ; Set a 1 quarter second timer.
break;
case @deTimer ; Timer
nStyle = DialogControlState(Handle,'Flasher002',@dcsGetStyle,0)
if nStyle & @csInvisible
DialogControlState(Handle,'Flasher002',@dcsRemStyle,@csInvisible) ; Clear the invisible bit
else
DialogControlState(Handle,'Flasher002',@dcsAddStyle,@csInvisible) ; Set the invisible bit
endif
nStyle = DialogControlState(Handle,'Flasher003',@dcsGetStyle,0)
if nStyle & @csInvisible
DialogControlState(Handle,'Flasher003',@dcsRemStyle,@csInvisible) ; Clear the invisible bit
else
DialogControlState(Handle,'Flasher003',@dcsAddStyle,@csInvisible) ; Set the invisible bit
endif
break;
endswitch
return @retDefault
#ENDFUNCTION
FlasherFormat=`WWWDLGED,6.2`
FlasherCaption=`This Does Nothing Useful - `:FlasherFormat
FlasherX=329
FlasherY=060
FlasherWidth=177
FlasherHeight=077
FlasherNumControls=003
FlasherProcedure=`Flash`
FlasherFont=`DEFAULT`
FlasherTextColor=`DEFAULT`
FlasherBackground=`DEFAULT,DEFAULT`
FlasherConfig=0
Flasher001=`070,054,033,014,PUSHBUTTON,"Flasher001",DEFAULT,"Stop!",1,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Flasher002=`036,014,043,030,STATICTEXT,"Flasher002",DEFAULT,DEFAULT,DEFAULT,2,0,DEFAULT,DEFAULT,"255|0|0"`
Flasher003=`102,015,042,025,STATICTEXT,"Flasher003",DEFAULT,DEFAULT,DEFAULT,3,@csInvisible,DEFAULT,DEFAULT,"255|0|0"`
ButtonPushed=Dialog("Flasher")
Thanks!