Thanks Ed,I've implemented the work around you suggested and it is working as 
expected now.cheers,tdtran
Message: 1
Date: Tue, 31 Jan 2012 09:02:02 -0600
From: Ed Leafe <[email protected]>
To: Dabo Users list <[email protected]>
Subject: Re: [dabo-users] Show/hide tabs/pages with dPageToolBar
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Jan 31, 2012, at 4:23 AM, tdtran tran wrote:

> I have a dPageToolBar control with 5 pages/tabs and want to dynamically 
> hide/show the tabs. I have tried using removePage, but this does not seem to 
> function correctly when attempting to remove one of the middle pages. For 
> example, removing page 4 would update the toolbar correctly (i.e. the icon 
> for page 4 is gone). However the button for page 5 no longer functions, i.e. 
> it does not change the current active tab to number 5 as expected.

There seems to be a problem in the wx.Toolbook class from which dPageToolBar is 
derived. When a page is removed the corresponding tool bar button is removed, 
but as you've noticed, some of the buttons no longer work. It appears that the 
buttons aren't linked to the page, but to the page number they were originally 
associated with, so when the page order changes, the links between the toolbar 
buttons and pages are broken.

The only work around that I can see is that when a page in the middle is 
removed, that all pages after it are also removed, and then re-added back in. 
This will take some work to implement.


-- Ed Leafe

                                          

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to