Child OF oWnd

Child OF oWnd

Postby Jimmy » Wed Nov 09, 2022 4:23 am

hi,

how can i find out which Control are Child OF oWnd :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Postby Antonio Linares » Wed Nov 09, 2022 7:17 am

Dear Jimmy,

oWnd:aControls
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Child OF oWnd

Postby Jimmy » Wed Nov 09, 2022 8:18 am

hi Antonio,
Antonio Linares wrote:oWnd:aControls

ah,thx
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Postby Jimmy » 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: Select all  Expand view
  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 view
  // TSAY
   oMain:aControls[1]:SETTEXT("hello world")

   // TCOMBOBOX
   oMain:aControls[2]:Select(3)   // 3rd Item
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Postby cnavarro » Wed Nov 09, 2022 1: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Child OF oWnd

Postby Antonio Linares » Wed Nov 09, 2022 2:14 pm

Dear Jimmy,

Harbour supports isDerivedFrom also:

Code: Select all  Expand view
MsgInfo( oControl:isDerivedFrom( "TWINDOW" ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Child OF oWnd

Postby Jimmy » Thu Nov 10, 2022 5:44 am

hi Antonio,
Antonio Linares wrote:Harbour supports isDerivedFrom also:
Code: Select all  Expand view
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 view
  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
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Child OF oWnd

Postby Antonio Linares » Thu Nov 10, 2022 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 23 guests