|
From: Alexander S.K. <al...@be...> - 2013-05-17 05:33:26
|
> What value should return in this case (sample below, button bt2) classname of dialog or classname of current control, now return classname of parent class?
The codeblock for ON CLICK gets the parent object and button's id as
parameters, so o22:classname will really return the classname of a
parent. To get the classname of a button you need to write: on click {
|o22,id|hwg_msginfo( o22:FindControl(id):classname ) }
Regards, Alexander.
>
> #include "guilib.ch"
> func main()
> local odlg, bt1, i1, bt2
> i1:=0
> init dialog odlg title "test" at 0,0 size 800,400
> @010,010 ownerbutton bt1 of odlg text "cnt" size 100,24 on click {|o|hwg_msginfo(o:classname),i1++,bt1:SetText(str(i1))}
> @010,120 Button bt2 caption 'this classname' Size 120,24 on click {|o22|hwg_msginfo(o22:classname)}
> odlg:activate()
> return nil
|