[Gambas-user] Switching between forms in tabstrip

Dimitris Anogiatis dosida at ...626...
Wed Feb 25 20:21:00 CET 2009


If I may add my 2 cents worth,

if you just use the form_keypress event
you might be able to do what you want.

this is my attempt; tbsettings is my tabstrip control
I have 4 tabs (with index 0 to 3)

add this to the form that you have the tabstrip onto

PUBLIC SUB Form_KeyPress()

  IF Key.Control THEN

    SELECT CASE tbSettings.Index
      CASE 0 TO 2
        INC tbSettings.Index
      CASE 3
        tbSettings.index = 0
      CASE ELSE
    END SELECT

  END IF

END

this would result in moving to the next tab when you just press
the control key

I haven't been able to make it to work with a combination of keys
but in Gambas 2.10 it works no matter what control has the focus

I only have one tabstrip control on my GUI so I am not sure if this
solution would work on multiple tabstrips or other layouts

Hope it helps and it's close to what you wanna do.

Regards,
Dimitrios

On Wed, Feb 25, 2009 at 12:14 PM, Doriano Blengino <
doriano.blengino at ...1909...> wrote:

> Vackoy ha scritto:
> > Thanks everyone for your responses.
> > I think that what Benoit and Doriano suggested are in the way of what I
> > need.
> >
> > Doriano, the layout of what I have is the following:
> > * a main form
> > * a workspace
> > * several forms added to the workspace by .add method
> >
> > Where should I add the menu, in the main form? the workspace? sorry but
> is
> > beyond what I have tried before
> > Thanks.
> >
> I think you should add the menu to the main form, but I never tried
> workspaces; I am happy with plain tabstrips.
> So, I really don't know if it works well with workspaces, because inside
> them there can be another menu, I suppose (well, this is true for
> tabstrips too, they can embed other forms). It is not clear to me the
> path events take to go from X11 to widget system to gambas to whatever ;-)
>
> Take a try... it should be quick and easy... good luck!
>
> Regards,
> Doriano
>
>
>
>
> ------------------------------------------------------------------------------
> 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