Page 1 of 1

how to set Parent to Control

Posted: Sun Oct 23, 2022 8:11 am
by Jimmy
hi,

i know Fivewin use OF Window ti assin Control

now i have this

Code: Select all | Expand

  DEFINE WINDOW oWnd FROM nTop, nLeft TO nHeight, nWidth PIXEL
      oExplorer := TExplorer():New( nTop, nLeft, nWidth - 20, nHeight -20, cPath )

how to set "Parent" oWnd to CLASS TExplorer() :idea:

if want to TABPAGE so i have to assign every Instance of TExplorer() to "Parent" TABPAGE

Re: how to set Parent to Control

Posted: Sun Oct 23, 2022 9:20 am
by Enrico Maria Giordano
Look at the fifth parameter:

Code: Select all | Expand

METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, nClrFore, nClrBack, oBrush, ;
            l2007, l2010, l2013, l2015 ) CLASS TExplorerBar

Re: how to set Parent to Control

Posted: Sun Oct 23, 2022 9:46 am
by Jimmy
hi Enrico,
Enrico Maria Giordano wrote:Look at the fifth parameter:

ooh, YES oWnd

Code: Select all | Expand

DEFAULT oWnd := GetWndDefault()

so it is a Handle to point to Parent (not a Object)

thx for help

Re: how to set Parent to Control

Posted: Sun Oct 23, 2022 9:57 am
by Enrico Maria Giordano
No, it has to be an object.

Re: how to set Parent to Control

Posted: Sun Oct 23, 2022 10:45 am
by Jimmy
hi Enrico,
Enrico Maria Giordano wrote:No, it has to be an object.

uuups ... sorry YES you are right