Linux Lib: a messagerequester replacement using GTK
Publié : ven. 27/oct./2006 21:35
Maybe not a real replacement but a good additional command (imo)
and a small demo to use with TailBite...
Simple usage:
as type you can use:
as buttons you can use
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:
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
As always... comments, suggestions are apreciated..
and a small demo to use with TailBite...
Simple usage:
Code : Tout sélectionner
MsgBox("My message text",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"","")
Code : Tout sélectionner
#GTK_MESSAGE_ERROR
#GTK_MESSAGE_INFO
#GTK_MESSAGE_QUESTION
#GTK_MESSAGE_WARNING
Code : Tout sélectionner
#GTK_BUTTONS_OK
#GTK_BUTTONS_CLOSE
#GTK_BUTTONS_OK_CANCEL
#GTK_BUTTONS_YES_NO
#GTK_BUTTONS_NONE
#GTK_BUTTONS_CANCEL
example:
Code : Tout sélectionner
MsgBox("My %s message text %s",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"first","is not long")
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

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