From: Jos Backus Date: 2002-02-09T04:07:49+09:00 Subject: Re: FXRuby: how to create a static status line? On Sat, Feb 09, 2002 at 02:45:20AM +0900, Lyle Johnson wrote: > I hope I'm not over-simplifying what you're asking for, but if you just want > a static message line along the bottom of the window, why not just use a > regular FXLabel? That's a good idea, but I would still need some kind of container because I need multiple FXLabel's in the status area: one for the "last" message (``Log saved to foo'', etc.) and another one (on the far bottom right) for the number of log entries. What kind of container should I use instead of FXStatusbar? Another question while I am here: is there a way to detect whether the Enter key was pressed in an FXTextField? Right now I'm doing FXLabel.new(commentframe, "Comments:") @comment = FXTextField.new(commentframe, 60, nil, 0) @comment.connect(SEL_UPDATE) { unless @comment.text.empty? addevent end } which mostly works. I tried using SEL_COMMAND instead but every time I click some button in my script this block is called also. Since the button also causes addevent to be called I end up with two events, whereas I really only want this block to be called when I hit Enter. My apologies for being dense; if somebody writes a book on FXRuby I'll buy it right away. -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;