|
From: vatzct <va...@po...> - 2011-12-01 13:17:00
|
Method ON SIZE don't work for objects which in hTab, see sample below:
#include "hwgui.ch"
func main()
local ownd,opan,obtclose, ot1,oPage,oLabel1,oLabel2,opage2,olabel11,olabel21
local obrw, obrw2
Local aItems := {"First", "Second", "Third", "Four"}
init window ownd title "test panel and ..." at 0,0 size 400,500
@0,0 PANEL oPan SIZE 400,206 ON SIZE {|o,x,y| o:Move(,,x-10,) }
@ 5,5 TAB oPage1 ITEMS {} of oPan SIZE 380,90 ON SIZE {|o,x,y| o:Move(,,x-30,) }
BEGIN PAGE 'Tab1' OF oPage1
@ 10,30 SAY oLabel1 CAPTION "Here Page 1" OF oPage1 SIZE 225,22
@ 10,55 COMBOBOX ocombo ITEMS aItems of oPage1 SIZE 200, 20 ON SIZE {|o,x,y| o:Move(,,x-30,) }
END PAGE OF oPage1
BEGIN PAGE 'Tab2' OF oPage1
@ 10,30 SAY oLabel2 CAPTION "Here Page 2 " OF oPage1 SIZE 225,22
END PAGE OF oPage1
@ 10,95 browse obrw ARRAY of oPan size 250,100 ON SIZE {|o,x,y| o:Move(,,x-30,) }
CreateArList( oBrw, { { "1","qq" }, { "2","ww" }, { "3","ee" }, { "4","rr" } } )
@ 5,210 TAB oPage2 ITEMS {} SIZE 250,160 ON SIZE {|o,x,y| o:Move(,,x-30,) }
BEGIN PAGE 'Tab1' OF oPage2
@ 10,30 SAY oLabel11 CAPTION "Here Page 1" OF oPage2 SIZE 225,22
@ 10,58 browse obrw2 ARRAY size 345,90 of oPage2 ON SIZE {|o,x,y| o:Move(,,x-30,) }
CreateArList( oBrw2, { { "1","a" }, { "2","b" }, { "3","c" }, { "4","d" } } )
END PAGE OF oPage2
BEGIN PAGE 'Tab2' OF oPage2
@ 10,30 SAY oLabel21 CAPTION "Here Page 2" OF oPage2 SIZE 225,22
END PAGE OF oPage2
@ 20, 375 COMBOBOX ocombo2 ITEMS aItems SIZE 250, 23 ON SIZE {|o,x,y| o:Move(,,x-30,) }
@010,400 ownerbutton obtclose text "close" size 60,24 on click {||ownd:close()}
ownd:activate()
return nil
Regards,
Alexey Myronenko
|