Thx Arnaud,
In the PagePanel, put this in the Change event:

  if me.Value=2 then
    Beep
    MsgBox "You can't use that tab."
    me.Value=MyLastIndex
  Else
    MyLastIndex=me.Value
  end if

This is somehow what I tried but then I got this problem (mail it to the list under "Tabpanel Stackoverflow exception ")

Ian Jones already explained what was wrong with the code.



Indeed, it would be more elegant to disable the tab, but it's not possible.

Another way, if you are using RB 2005 or 2006, would be to remove completely the tab. As I don't use RB 2005, I can't predict if embedded controls are also removed/hidden or if they are going to another tab, etc.


The LR states that the embedded controls will be removed at the same time. Rebuilding the page with code (rebuilding all controls) was too much off a hassle so I choose the method mentioned above.

Thanks for your help

Bart

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to