Página 1 de 1

triggering F1, using methods SaveState() and RestoreState()

Publicado: Sab Oct 01, 2005 10:46 am
por Ingo
Hello,
I'm just trying Xailer-Ide-demo prerelease 5 an having some questions to the
Xailer-people:
1. how to use the F1-key as the general help-key showing each topic ::HelpId
of any form without installing "FormKeyDown()" in every form
2. how to use SaveState() and RestoreState()
3. is the bugfixed prerelease 5 ready soon?
Regards
Ingo

triggering F1, using methods SaveState() and RestoreState()

Publicado: Dom Oct 02, 2005 1:27 pm
por jfgimenez
Ingo,
> 1. how to use the F1-key as the general help-key showing each topic
> ::HelpId of any form without installing "FormKeyDown()" in every form
We are designing a global solution for :HelpId, but it's not ready yet.
Meanwhile, you can add this code to your application:
//---------------------------------------------------------- --------------------
CLASS TControl FROM XControl
METHOD WMHelp()
ENDCLASS
//---------------------------------------------------------- --------------------
METHOD WMHelp() CLASS TControl
IF !Empty( ::HelpId )
WITH OBJECT THelp():New( "YourHelpFile.chm" )
IF :ShowKeyword( ::HelpId, .F. )
RETURN 0
ENDIF
END
ENDIF
RETURN Nil
//---------------------------------------------------------- --------------------
> 2. how to use SaveState() and RestoreState()
SaveState() is a method from TForm which returns a string. This string
contains all needed information to restore the window to the state it had at
that moment. You can store this string in any way (a .ini file, a field in a
..dbf, a field in a SQL database, etc.).
To restore the window to that state, you need to call RestoreState() passing
the string as an argument.
> 3. is the bugfixed prerelease 5 ready soon?
Yes, it will be published next monday or tuesday.
--
Regards,
Jose F. Gimenez

triggering F1, using methods SaveState() and RestoreState()

Publicado: Mar Oct 04, 2005 6:59 am
por ingo[1]
José.
muchas gracias!
Saludos
Ingo