FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Hide controls in a dialog before activating it.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Hide controls in a dialog before activating it.
Posted: Sat May 29, 2010 12:10 AM
Antonio,

Then maybe these methods should be something like this?

Code (fw): Select all Collapse
   METHOD Hide() INLINE ::lVisibile:=.F., ShowWindow( ::hWnd, SW_HIDE )

   METHOD Show() INLINE  ::lVisible:=.T., ShowWindow( ::hWnd, SW_SHOWNA )


However, I have not looked at the code to see how the var lVisible is actually used.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Hide controls in a dialog before activating it.
Posted: Sat May 29, 2010 05:26 AM

James,

Actually DATA lVisible just stores the visible status but it does not perform any action if we change it, in example if we do oControl:lVisible := .F. then the control will not be hidden.

Thats why in order to implement that functionality, DATA lVisible should be turned into a Method. But I am afraid that such change could break existing users code, meanwhile such functionality can be done using Methods Hide() and Show().

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Hide controls in a dialog before activating it.
Posted: Sat May 29, 2010 06:50 AM
Hello,

this remember me this topic http://forums.fivetechsupport.com/viewtopic.php?f=22&t=9676 in the TO DO forum isn't it?

regards

Marcelo
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Re: Hide controls in a dialog before activating it.
Posted: Mon May 31, 2010 11:11 AM
Antonio Linares wrote:James,

Actually DATA lVisible just stores the visible status but it does not perform any action if we change it, in example if we do oControl:lVisible := .F. then the control will not be hidden.

such functionality can be done using Methods Hide() and Show().


Anyway, if I call a HIDE() in an control before the dialog is initialized, when the dialog is shown the control is not hidden and lVisible := .F. !
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Hide controls in a dialog before activating it.
Posted: Mon May 31, 2010 01:50 PM

Concentra,

Yes, you are right, as the control still does not have a valid Windows handle. We could modify this, but actually it is implemented this way.

So the calls to oControl:Hide() or oControl:Show() must be issued from the ON INIT clause of the dialog, as from that moment on, the controls have a valid Windows handle.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 711
Joined: Thu Oct 06, 2005 09:57 PM
Re: Hide controls in a dialog before activating it.
Posted: Sun Apr 03, 2011 05:44 AM
ukoenig wrote:You can Hide a Control on Dialog-Init :

ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( GradBrush( oDlg, { { 0.50, 16314573, 14853684 }, ;
{ 0.50, 14853684, 16314573 } }, .T. ), ;
oSay1:Hide() ) ;


Ich benutze Heute das.

Gracias por tu ayuda ( Danke Uwe für deine Hilfe).

Tschüss
Un saludo



Manuel

Continue the discussion