Page 1 sur 1

Linux Lib: a messagerequester replacement using GTK

Publié : ven. 27/oct./2006 21:35
par walker
Maybe not a real replacement but a good additional command (imo)
and a small demo to use with TailBite...
Simple usage:

Code : Tout sélectionner

MsgBox("My message text",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"","")
as type you can use:

Code : Tout sélectionner

#GTK_MESSAGE_ERROR
#GTK_MESSAGE_INFO
#GTK_MESSAGE_QUESTION
#GTK_MESSAGE_WARNING
as buttons you can use

Code : Tout sélectionner

#GTK_BUTTONS_OK
#GTK_BUTTONS_CLOSE
#GTK_BUTTONS_OK_CANCEL
#GTK_BUTTONS_YES_NO
#GTK_BUTTONS_NONE
#GTK_BUTTONS_CANCEL
the two last parameters can be used to substitute a variable within the Messagetext. The variable to be substituted is %s (the first occurance of %s will be replaced by the first text, the second one by the second text)

example:

Code : Tout sélectionner

MsgBox("My %s message text %s",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"first","is not long")
the link to the lib:
http://home.arcor.de/x-linux/pure/msgbox/msg_box_lib

and the source:
http://home.arcor.de/x-linux/pure/msgbox/msg_box_lib.pb

A warning: if you use this command before one window was opened you must use gtk_init_(0,0) befor you can use this command otherwise the gtk_init_() stuff will be done automatically when opening a window

A thing you can't change is the titel of the Message (this is determined by the message type) BUT you'll have the little image like on Windows and the variable substitution 8)

As always... comments, suggestions are apreciated..

Publié : sam. 28/oct./2006 23:31
par Crystal Noir
interesting, but i have some pbs with linux version, I have a linker error when I want to launch some simple graphical examples (like move a sprite) (SDL error and linker error) :(

I try to make this linux version work :( (v3.94)

use vmware 5 +mandriva 2006 (not 2007)

En français pleas!

Publié : dim. 29/oct./2006 0:26
par meganet
Et en français ça donne quoi? Moi comprend pas grand chose en anglais etpuis on est sur le forum français non?

Re: En français pleas!

Publié : dim. 29/oct./2006 9:28
par Backup
meganet a écrit :Et en français ça donne quoi? Moi comprend pas grand chose en anglais et puis on est sur le forum français non?
oui surtout que si on s'amuse a écrire Français sur leur Forum
y en a toujours un pour raller :lol: