FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Child OF oWnd
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Child OF oWnd
Posted: Wed Nov 09, 2022 04:23 AM
hi,

how can i find out which Control are Child OF oWnd :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Child OF oWnd
Posted: Wed Nov 09, 2022 07:17 AM

Dear Jimmy,

oWnd:aControls

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Child OF oWnd
Posted: Wed Nov 09, 2022 08:18 AM
hi Antonio,
Antonio Linares wrote: oWnd:aControls
ah,thx
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Child OF oWnd
Posted: Wed Nov 09, 2022 10:25 AM
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 (fw): Select all Collapse
   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 (fw): Select all Collapse
   // TSAY
   oMain:aControls[1]:SETTEXT("hello world")

   // TCOMBOBOX
   oMain:aControls[2]:Select(3)   // 3rd Item
greeting,

Jimmy
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Child OF oWnd
Posted: Wed Nov 09, 2022 01:11 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Child OF oWnd
Posted: Wed Nov 09, 2022 02:14 PM
Dear Jimmy,

Harbour supports isDerivedFrom also:
Code (fw): Select all Collapse
MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Child OF oWnd
Posted: Thu Nov 10, 2022 05:44 AM
hi Antonio,
Antonio Linares wrote:Harbour supports isDerivedFrom also:
Code (fw): Select all Collapse
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 (fw): Select all Collapse
   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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Child OF oWnd
Posted: Thu Nov 10, 2022 06:49 AM

Dear Jimmy,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion