1. RE: destroying tabcontrol (or tabs)

jacktarred at yahoo.com wrote:
> Is there anyway to destroy a tab or tabcontrol?  
> 
> I have place a tab control in its own window and tried
> closing then re-opening the window before the next
> call to the tab control.
> 
> I have also tried to trackObject then deleteObject,
> but I seem to have the same tabItems each time it
> re-creates the tabControl.
> 
> Thanks for all your help.
> 
> partial code below:
> 
> integer NoExitWin, StockTab, x1, y1
> sequence where
> 
> 	where = getRect( StockMain )
>         x1 = where[1]
>         y1 = where[2]
> 
> 	 NoExitWin = create( Window,"", StockMain, x1+292,
> y1+32, 430, 235, { WS_POPUP} )
> 	 StockTab = createEx( TabControl, "", NoExitWin, 0,
> 0, 430, 235, 0, 0 )
>          setWindowBackColor( NoExitWin,{131, 172, 150}
> )
>          trackObject( NoExitWin, StockTab, ForProgram
> )
> 
> --=========ViewPort Button=====================
> procedure onClick_ViewPort()
>         integer index, msgbx1
>         sequence viewthis
>         if donethisbefore = 2 then
>            deleteObject( StockTab )
>         end if
> 
>          viewthis = {}
> 	index = getIndex( PortLst )
> 	if index < 1 then
>            msgbx1 = message_box( "Please select a
> portfolio from your list", "", {} )
>         elsif index >= 1 then
>            closeWindow( NoExitWin )
>            openWindow( NoExitWin, Normal )
>            viewthis = paths[index]
> 	   ViewStocks( viewthis, StockTab )
>         end if
>         donethisbefore = 2
> end procedure
> 
> 

This is on my TODO list. But why do you need to destroy the TabControl? 
If you don't need it displayed, you can hide it or not create it. If you 
just need to change its contents, the you can destroy TabItems or the 
controls in the TabItems.

In other words, what problem is "destroying a tabcontrol" going to solve 
for you?

-----
Derek.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu