[Gambas-user] setting title on a message box

bb adamnt42 at gmail.com
Mon May 2 16:27:20 CEST 2022


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



More information about the User mailing list