how to release Control "on Tab"

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

how to release Control "on Tab"

Post 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 1027 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:
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2060
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: how to release Control "on Tab"

Post 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 )
have fun
Jimmy
Post Reply