[Gambas-user] setting title on a message box

Charles Bukowski charlesbukowski.italy at gmail.com
Mon May 2 16:44:48 CEST 2022


It works!
Many thx
c

Il giorno lun 2 mag 2022 alle ore 16:28 bb <adamnt42 at gmail.com> ha scritto:

> On Mon, 2022-05-02 at 16:20 +0200, Charles Bukowski wrote:
> > Hi, I am a new gambas user and I have just installed the current
> > stable ide
> > release which is 3.17.2.
> > I am trying to show a "message box" when clicking on a button inside
> > the
> > form main () using comp • gb.qt4 • message class .
> > this message box must show a text inside and a title.
> > Compilation is successful, but at runtime I get "Type mismatch :
> > wanted
> > _BoxedString, got string instead" at the source code line that sets
> > the
> > property "title".
> > I have checked documentation at
> > http://gambaswiki.org/wiki/comp/gb.qt4/message/title and that
> > property
> > datatype is a normal string.
> >
> > Here my code :
> > Public Sub Button1_Click()
> > Dim a As String
> > a = "teststring"
> > Print a
> >   Message.Title(a)  ------>  error Type mismatch : wanted
> > _BoxedString, got
> > string instead
> >   Message.Info(a)  -------> printed correctly
> > End
> >
> > I have attached my current environment configuration.
> > What's wrong?
> > Thank you
> >
> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> Use Message.Title = a
> Message.Title is a property
>
> hth
> b
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220502/d0b336fe/attachment.htm>


More information about the User mailing list