[Gambas-user] How to remove tabs from workspace in code

Benoit Minisini gambas at ...1...
Wed Mar 12 00:17:04 CET 2008


On mardi 11 mars 2008, richard terry wrote:
> Is this possible.
>
> I can add tabs to the workspace , and obviously user can click on the the
> tab and click on the cross and close the tab, but I want to be able to
> reset my progress notes editor by removing all the tabs in code.
>
> Any help appreciated.
>
> Richard
>

You don't remove the tabs. You just close your MDI child windows:

DIM hWindow AS Window

TheWorkspace.Lock
FOR EACH hWindow IN TheWorkspace.Children
  hWindow.Close
NEXT
TheWorkspace.Unlock

The Lock & Unlock methods are useful to prevent the Workspace to flicker.

Regards,

-- 
Benoit Minisini




More information about the User mailing list