Files
harbour-core/harbour/examples/hbgf/tests/form2.prg
Viktor Szakats 461ea1568f 2009-05-29 11:04 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
- contrib/examples
  + examples
  * doc/dirstruc.txt
  * doc/whatsnew.txt
  * examples/hbdoc/Makefile
  * examples/pp/Makefile
  * examples/hboleold/Makefile
  * examples/hbsqlit2/Makefile
  * examples/misc/Makefile
  * examples/hbapollo/Makefile
  * examples/rdddbt/Makefile
  * examples/guestbk/Makefile
  * examples/pe/Makefile
  * examples/hbgf/hbgfwin/Makefile
  * examples/hbgf/hbgfos2/Makefile
  * examples/hbgf/hbgfgtk/Makefile
  * examples/hbgf/Makefile
  * examples/uhttpd/readme.txt
  * examples/dbu/Makefile
  * examples/hscript/Makefile
  * examples/hbwhat/Makefile
  * examples/rl/Makefile
  * examples/Makefile
    * Moved to flatten our dir layout and sync the locations
      in unified distro and source tree.
    ; TODO: As a next step I'll replace Makefiles with .hbm 
            files. This will allow users to build these parts 
            outside the source distribution.
2009-05-29 09:05:10 +00:00

57 lines
1.0 KiB
Plaintext

//
// $Id$
//
// Inheriting from Class HBForm sample
#include "hbclass.ch"
function Main()
local oForm2 := HBForm2():New()
oForm2:ShowModal()
return nil
CLASS HBForm2 FROM HBForm
METHOD New()
METHOD TestClick( oSender )
METHOD ExitClick( oSender ) INLINE ::Close()
ENDCLASS
METHOD New() CLASS HBForm2
local oMenu, oMenuItem
Super:New()
::Caption = "Harbour GUI demo"
oMenu = HBMenu():New( Self )
oMenuItem = HGFMenuItem():New( oMenu )
oMenuitem:Caption = "Test"
oMenuitem:Name = "Test"
oMenuItem:OnClick = "TestClick" // The container method to execute
oMenu:Add( oMenuItem )
oMenuItem = HGFMenuItem():New( oMenu )
oMenuitem:Caption = "Exit"
oMenuitem:Name = "Exit"
oMenuItem:OnClick = "ExitClick" // The container method to execute
oMenu:Add( oMenuItem )
::Menu = oMenu
return Self
METHOD TestClick( oSender ) CLASS HBForm2
MsgInfo( "This event has been fired by a " + oSender:ClassName() + " object",;
"Welcome to Harbour GUI power" )
return nil