From d3fb7afe0c204a581a74fc5d31ea71f736264d86 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Sat, 1 Sep 2001 07:38:46 +0000 Subject: [PATCH] Harbour GUI framework Class TForm inheritance sample --- harbour/contrib/hgf/tests/form2.prg | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 harbour/contrib/hgf/tests/form2.prg diff --git a/harbour/contrib/hgf/tests/form2.prg b/harbour/contrib/hgf/tests/form2.prg new file mode 100644 index 0000000000..117ecd5499 --- /dev/null +++ b/harbour/contrib/hgf/tests/form2.prg @@ -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 \ No newline at end of file