[Gambas-user] Need help on Tabstrip

Stefano Palmeri rospolosco at ...152...
Sun Aug 29 01:27:57 CEST 2010


Il sabato 28 agosto 2010 22:05:28 Benoît Minisini ha scritto:
> > Il sabato 28 agosto 2010 10:57:29 Reynaldi Jansen ha scritto:
> > > Hello.
> > >
> > > I want to ask how to copy control in tab to another tab?
> > > I have a tabstrip with textarea, and when user want new tab, i want it
> > > create a new tab with textarea too inside the new tab...
> > > I don't have any idea how to do this on gambas...
> > > Sorry for a poor question :-(
> > >
> > > Thanks!
> >
> > Hi. I attached a little example.
> >
> > The GTK version is needed if you're under a 'gtk' desktop, but it works
> > well even under qt. So the GTK version is the good one; it has two more
> > lines of code because the NOT-gtk version crashes the Gambas IDE. Is it a
> > bug, Benoit?
>
> I don't see any difference in the source code of both projects. Both work
> as expected. Are you sure that you sent the good files?

Sorry, I messed up things. Anyway the two lines are these:

TabStrip1[TabStrip1.Count - 1].Text = "Tab " & (TabStrip1.Count - 1)
TabStrip1.Index = TabStrip1.Count - 1

With gb.qt you *don't need* these two lines to create a 'New Tab' and put 
focus on it. It works perfectly.

If you remove these two lines gb.qt still works, but gb.gtk crashes the IDE.
Attached the fixed example. Try selecting gb.gtk and you get a crash, at least 
on my system. 

Gambas 2.20
Qt 3.3.8b
Gtk 2.12.12 

Saluti,

Stefano











-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabstrip-0.0.3.tar.gz
Type: application/x-tgz
Size: 8099 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20100829/7e9a0388/attachment.bin>


More information about the User mailing list