[Gambas-user] Switching between forms in tabstrip

Dimitris Anogiatis dosida at ...626...
Thu Feb 26 16:42:43 CET 2009


After reading Benoît 's guidelines and going through my previous example
I came up with this.

PUBLIC SUB Form_KeyPress()
  IF Key.Control
    SELECT CASE Workspace1.Children.Find(Workspace1.ActiveWindow)
     CASE 0 TO Workspace1.Children.Count - 2
        Workspace1.ActiveWindow =
Workspace1.Children[Workspace1.Children.Find(Workspace1.ActiveWindow) + 1]
     CASE Workspace1.Children.Count - 1
        Workspace1.ActiveWindow = Workspace1.Children[0]
     CASE ELSE
    END SELECT
  ENDIF
END

Add this to the code of the form that has the workspace

it should have the desired effect.

Hopefully this will bring you closer to what you want to do.

Regards
Dimitris

On Thu, Feb 26, 2009 at 6:20 AM, Benoît Minisini <
gambas at ...1...> wrote:

> > Dimitris,
> > thanks for the tip. I can get the Keypress event from the form and get
> the
> > combination for Ctrl + Tab.
> > However, since I have a Workspace, I don't know how to access the
> Tabstrip
> > control or how to index the forms in it.
>
> You don't.
>
> You must use the Workspace.Children property to get an array of all child
> windows, choose your window, and then set the Workspace.ActiveWindow
> property.
>
> Regards,
>
> --
> Benoît
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list