[Gambas-user] Positioning Image and Text in a Button

Gianluigi bagonergi at ...626...
Mon Aug 22 22:42:58 CEST 2016


So it works really well 👍

2016-08-22 21:31 GMT+02:00 Fabien Bodard <gambas.fr at ...626...>:

> remove the font scaling part and replace draw.text by :
>
> Draw.RichText(Html($sText), 0, 0, Me.W, Me.H + Me.H / 2, Align.Center)
>
> 2016-08-22 19:21 GMT+02:00 herberth guzman <herberthguzman at ...626...>:
> > Thanks Gianluigi
> > Thanks Fabien
> > Tthanks Charlie
> >
> > Examples are good, I look at the potential of prawns, and ease of doing
> > things.
> >
> >
> > What I do is like the example of Charlie.
> >
> > The problem is that is not a button
> > They can be in a container 20 and that makes it hard.
> >
> > As I can create a button from a class with the result I need.
> >
> > Example Gianluigi
> >
> > If Paint.Font.TextWidth ($ sText)> Then Me.W
> >      While Paint.Font.TextWidth ($ sText)> Me.W
> >        Paint.Font.Size - = 0.1
> >      Wend
> >    endif
> >
> >
> > I need the text is not Strech (Paint.Font.Size - = 0.1)
> > I need to be new line(2 lines).
> >
> > Example
> >
> > NOT
> > Chromium Web Browser
> >
> > YES
> > Chromium Web
> >      Browser
> >
> > Can you help me, please.
> >
> >
> > Herberth Guzmán
> >
> > ------------------------------------------------------------
> ------------------
> >
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
>
> --
> Fabien Bodard
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> 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