Child OF oWnd
- Antonio Linares
- Site Admin
- Posts: 42273
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Child OF oWnd
hi Antonio,
when use FWLOG i got
how to "identify" Control "Type"
are Array Element a Object
---
if i know "Type" of Object and Element "is" a Object : can i write this Way
when use FWLOG i got
Question :oMain:aControls = {TSAY,TCOMBOBOX,TFOLDER,TCOMBOBOX,TFOLDER,TSPLITTER, ...}
how to "identify" Control "Type"
are Array Element a Object
Code: Select all | Expand
FOR ii := 1 TO LEN(oMain:aControls)
Object := oMain:aControls[ii]
DO CASE
CASE Object:isDerivedFrom("TSAY") // Xbase++ Syntax
Object:SetPos()
Object:SetSize()
if i know "Type" of Object and Element "is" a Object : can i write this Way
Code: Select all | Expand
// TSAY
oMain:aControls[1]:SETTEXT("hello world")
// TCOMBOBOX
oMain:aControls[2]:Select(3) // 3rd Item
greeting,
Jimmy
Jimmy
Re: Child OF oWnd
Yes, that's right
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
- Antonio Linares
- Site Admin
- Posts: 42273
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Child OF oWnd
Dear Jimmy,
Harbour supports isDerivedFrom also:
Harbour supports isDerivedFrom also:
Code: Select all | Expand
MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
Re: Child OF oWnd
hi Antonio,
---
when using FWLOG i "just" got 1-DIM Array which Controls
but also "all other" Control (not show in Sample) include "Main" are in "Log" of "x"
Question : are these "Original" Value in Array or will they change
that help me very muchAntonio Linares wrote:Harbour supports isDerivedFrom also:Code: Select all | Expand
MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
---
when using FWLOG i "just" got 1-DIM Array which Controls
but when look at each Control there are "more" (Array)oMain:aControls = {TSAY,TCOMBOBOX,TFOLDER,TCOMBOBOX,TFOLDER,TSPLITTER,TBUTTON, ... }
Code: Select all | Expand
x := hb_valToExp(oMain:aControls[ii])
the 1st Sub-Array seems to be Control itself and have all Information of it include "Name" (CVARNAME)__itemSetObj( __itemSetRef( {{HWND, 394868}, {NOLDPROC, 4294903408}, {CCAPTION, }, {CVARNAME, oSayActive}, {NID, 102}, {TWINDOW:NTOP, 864}, {TWINDOW:NLEFT, 10}, {NBOTTOM, 893}, {NRIGHT, 649.00}, {NSTYLE, 1342177280}, {NCLRPANE, 16777215}, {NCLRTEXT, 0}, {ACONTROLS, {}}, {OBRUSH, {{HBRUSH, 9437200}, {HBITMAP, 0}, {HBMPORGL, 0}, {NCOUNT, 6}, {NRGBCOLOR, 16777215}, {LSYSTEM, .T.}, {USOURCE, CLR_WHITE}}}, {OFONT, {{CFACENAME, TAHOMA}, {HFONT, 1242174205}, {HFONTOLD, 0}, {LBOLD, .F.}, {LITALIC, .F.}, {LUNDERLINE, .F.}, {LSTRIKEOUT, .F.}, {NINPHEIGHT, -20}, {NINPWIDTH, 0}, {NESCAPEMENT, 0}, {NORIENTATION, 0}, {NWEIGHT, 0}, {NCHARSET, 0}, {NOUTPRECISION, 0}, {NCLIPPRECISION, 0}, {NQUALITY, 0}, {NPITCHFAMILY, 0}, {NCOUNT, 27}, {LDESTROY, .T.}, {LNEW, .F.}}} , ...
but also "all other" Control (not show in Sample) include "Main" are in "Log" of "x"
Question : are these "Original" Value in Array or will they change
greeting,
Jimmy
Jimmy
- Antonio Linares
- Site Admin
- Posts: 42273
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Child OF oWnd
Dear Jimmy,
Keep in mind that each control keeps a DATA oWnd that holds its parent object
Keep in mind that each control keeps a DATA oWnd that holds its parent object