[fxruby-users] Advice sort on using FXText widget

Joel VanderWerf vjoel at path.berkeley.edu
Sun Dec 18 20:32:47 EST 2005

Russell Fulton wrote:
> Hi Folk,
> 	well I'm now writing and app (to manage snort sensors and rulefiles )
> and have am now trying to figure out which is the best widget for the job.
> Snort rule files have one rule per line, I want to display the rule file
> in a frame and allow the user to select individual rules by clicking on
> them.  I may also want to select portions of a rule.
> Currently I'm using FXText but I find the FXEvent returns pixel (?)
> coordinates but all the FXText methods take a single 'pos' parameter
> which presumably is the index from the start of the buffer.  Clearly
> there must be a straight forward way to may between the two but I can't
> figure it out.
> May be I'd be better off using some other widget but I can't see one.

What about an FXList, one entry per line of the file?

That doesn't help with selecting "portions"... are these portions 
syntactic chunks or arbitrary substrings? If the former, maybe a tree 
list would work (following the parse tree).

        vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

More information about the fxruby-users mailing list