Child OF oWnd

Post Reply
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Child OF oWnd

Post by Jimmy »

hi,

how can i find out which Control are Child OF oWnd :?:
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42273
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Child OF oWnd

Post by Antonio Linares »

Dear Jimmy,

oWnd:aControls
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Post by Jimmy »

hi Antonio,
Antonio Linares wrote: oWnd:aControls
ah,thx
greeting,
Jimmy
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Post by Jimmy »

hi Antonio,

when use FWLOG i got
oMain:aControls = {TSAY,TCOMBOBOX,TFOLDER,TCOMBOBOX,TFOLDER,TSPLITTER, ...}
Question :
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
User avatar
cnavarro
Posts: 6552
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Child OF oWnd

Post by cnavarro »

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
User avatar
Antonio Linares
Site Admin
Posts: 42273
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Child OF oWnd

Post by Antonio Linares »

Dear Jimmy,

Harbour supports isDerivedFrom also:

Code: Select all | Expand

MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Post by Jimmy »

hi Antonio,
Antonio Linares wrote:Harbour supports isDerivedFrom also:

Code: Select all | Expand

MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
that help me very much :D

---

when using FWLOG i "just" got 1-DIM Array which Controls
oMain:aControls = {TSAY,TCOMBOBOX,TFOLDER,TCOMBOBOX,TFOLDER,TSPLITTER,TBUTTON, ... }
but when look at each Control there are "more" (Array)

Code: Select all | Expand

   x :=  hb_valToExp(oMain:aControls[ii])
__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.}}} , ...
the 1st Sub-Array seems to be Control itself and have all Information of it include "Name" (CVARNAME)
but also "all other" Control (not show in Sample) include "Main" are in "Log" of "x" :shock:

Question : are these "Original" Value in Array or will they change :?:
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42273
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Child OF oWnd

Post by Antonio Linares »

Dear Jimmy,

Keep in mind that each control keeps a DATA oWnd that holds its parent object
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply