Page 1 of 1

how to release Control "on Tab"

Posted: Fri Feb 14, 2020 4:16 am
by AUGE_OHR
hi,

i have work on Tab and now i want to close Tabpage with DeletePage()
i have use AddPage() and AddControl() and this is now my Problem

use DeletePage() the Tabpage is gone but when maximize the 2nd Grid appear :shock:
so i look with Debugger and my Array are OK but i found this PUBLIC
how_release_Public.JPG
how_release_Public.JPG (35.85 KiB) Viewed 1028 times
all Grid are create this Way

Code: Select all

   @ nRow, nCol GRID &cObj ;
           PARENT &cForm ;
so how get rid of _WINLEFT_GRID_2 :idea:

Re: how to release Control "on Tab"

Posted: Fri Feb 14, 2020 4:47 am
by AUGE_OHR
OK ... it is harbour not Xbase++ where GC ( Garbage Collector ) do "clean-up" ;)

i have to ".Release" all Control on Tab-Page manuel before DeletePage()

Code: Select all

   nDim := WinLeft.Tab_Left.Value

   cForm := "WinLeft"
   cObj  := "Grid_"+LTRIM( STR(nDim))
   Domethod( cForm , cObj, "Release" )
   
   WinLeft.Tab_Left.DeletePage( nDim )
   ADEL( Stack_Left, nDim )
   ASIZE( Stack_Left, LEN( Stack_Left ) - 1 )
   nDimLeft := LEN( Stack_Left )