Harbour GUI framework Class TForm inheritance sample
This commit is contained in:
37
harbour/contrib/hgf/tests/form2.prg
Normal file
37
harbour/contrib/hgf/tests/form2.prg
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
|
||||
// Inheriting from Class TForm sample
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
function Main()
|
||||
|
||||
local oForm2 := TForm2():New()
|
||||
|
||||
oForm2:ShowModal()
|
||||
|
||||
return nil
|
||||
|
||||
CLASS TForm2 FROM TForm
|
||||
|
||||
METHOD New()
|
||||
|
||||
METHOD Button1Click( oSender )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD New() CLASS TForm2
|
||||
|
||||
Super:New()
|
||||
|
||||
::cCaption = ::ClassName()
|
||||
|
||||
return Self
|
||||
|
||||
METHOD Button1Click( oSender ) CLASS TForm2
|
||||
|
||||
MsgInfo( oSender:ClassName() )
|
||||
|
||||
return nil
|
||||
Reference in New Issue
Block a user