[Gambas-user] Re: TextLabel misbehaving inside ScrollView.

Benoit Minisini gambas at ...1...
Sun May 7 17:45:08 CEST 2006


On Saturday 06 May 2006 10:08, Jose J. Rodriguez wrote:
> On 5/6/06, Benoit Minisini <gambas at ...1...> wrote:
> > On Saturday 06 May 2006 03:33, Jose J. Rodriguez wrote:
> > > On 5/4/06, Jose J. Rodriguez <joe1962 at ...626...> wrote:
> > > > Hello,
> > > >
> > > > I'm trying to get a vertically scrollable TextLabel by embedding it
> > > > inside a ScrollView, but when I set Textlabel.Autoresize to True, it
> > > > becomes wider than the client area of the ScrollView, in fact, wider
> > > > than the ScrollView control itself, as I can see if I activate both
> > > > scrollbars. It doesn't matter if I set the TextLabel to Expand or
> > > > not, nor does it matter which Arrangement I set for the ScrollView.
> > > > If I manually set the width to Scroll.ClientWidth, I lose text at the
> > > > bottom of the TextLabel. The ScrollView has Expand = True, in case
> > > > this has anything to do with it.
> > > >
> > > > This is in Gambas 1.9.29.
> > >
> > > Still getting nowhere with this. I'd really appreciate a solution,
> > > workaround (like how to know the height of the TextLabel needed to fit
> > > the text, etc) or at least acknowledgement of the problem, as I'm sort
> > > of stuck at this point on the installer project. The full blown html
> > > component is not feasable for this, as it means adding another
> > > component and also reduces the possibility if porting to the gtk
> > > component later.
> > >
> > > Regards,
> > > Joe1962
> >
> > There is no real solution at the moment, but you can use a TextView
> > instead of a TextLabel, because it has a TextWidth and TextHeight
> > property.
>
> Like I tried to say, TextView needs another component and has no
> equivalent in GTK component. Also, it doesn't have "Padding", heh heh.
> What TextView needs is a "AutoResize direction", with possible values
> of horizontal, vertical and both.
>
> Regards,
> Joe1962
>

TextLabel is just for displaying a simple and short HTML text. The problem is 
that TextView needs to be implemented in the GTK component. Adding features 
to the Qt version of TextLabel does not mean that the GTK one will have them 
automagically!

Regards,

-- 
Benoit Minisini





More information about the User mailing list