[fxruby-users] Help widget: suggestion?

dragoncity dragoncity at impulse.net.au
Tue Jan 11 20:37:32 EST 2005


 Riccardo, I found this was an easy way to show a 'help' dialog, the 
"formatting" is done via simple "\n" (new line) and "+"  char to continue 
with the Message.

It displays a dialog message , waits till OK button pressed , then continues.
Cheers,
Brett

# =======================================================
# 		     			        H E L P 
# =======================================================
pushbutton4= FXButton.new(btnRow,'Help' ,nil, nil, 0, BUTTON_NORMAL|
JUSTIFY_RIGHT )
pushbutton4.connect(SEL_COMMAND) do |sender, sel, checked|
# ## your button press code here ##
@statusbar.getStatusLine.setNormalText('Show Help ')

FXMessageBox.information(self, MBOX_OK, "Rough Guide to #{SpamBGone} ", 
	"  #{SpamBGone}#{SpamVersion} Copyright  Brett S Hallett  (c)2003 : 
dragoncity at impulse.net.au  " +
	" \n \n" +
	"To use #{SpamBGone} you must firstly have a Internet address with a Internet 
Service Provider\n" +
	"and be connected,\n Spam-B-Gone then reads all your mail header info (does 
not read the mail)\n" +
	"the headers are displayed to you in a table layout, you then 'tick' the mail 
you wish to be deleted \n" +
	"on your ISP's computer \n"+
	" \n" +
	"--> click 'Check Mail' to read the mail headers  \n"+
	" \n" +
	"now 'click' in the row of the  Delete? column any mail you wish to have 
deleted, \n" +
	"the text 'delete' will appear, you may 're-click' to reset. \n" +
	" \n" +
	"--> click 'Process Deletes' to have the selected mail deleted \n"+
	" \n" +
	"--> if you 'Quit' without clicking 'Process Mail' the selected mail is NOT 
deleted \n" +
	" \n" +
	"#{SpamBGone} does not retain any information about your mail.\n" +
	" \n" +
	"Now collect your mail using your usual E-mail program. \n" +
	"--> click 'Call Mail' to start your Email program (defaults to Kmail) \n"+
	"\n")
@statusbar.getStatusLine.setNormalText('')	
end # pushbutton4


> Dear all FXRuby users
>
> I'm writing to ask for a suggestion; I need to display some documentation
> in my FXRuby application for the user, nothing particularly complicate ..
> till now my solution was to generate HTML pages and than, from the GUI, to
> start a browser to load that HTML pages .. on windows this is quite easy
> ('start doc\\index.html' or something like this), while on Linux I've
> found around some code (in the FOX community page) to guess the browser
> installed (Mozilla, Firefox, whatever) .. now, althought this is working,
> I'm wondering if I really need to start an external application for my
> user help .. I've seen in the examples of FXruby (the texteditor) that
> help is shown as a simple dialog with text inside .. just wondering is
> someone has worked on this and end up with some nice widgets and/or
> suggestions ..
>
> Thanks to all, Riccardo :)

-- 
Cheers,
Brett S Hallett


More information about the fxruby-users mailing list