<div class="gmail_quote">On Tue, Nov 24, 2009 at 2:42 PM, Stuart Clarke <span dir="ltr"><<a href="mailto:stuart_clarke86@yahoo.com">stuart_clarke86@yahoo.com</a>></span> wrote:</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>My questions are, how can I create the text field as an append-able area? For example, as a user I want to type things into the text area (input area) and I will also click buttons which will add some data to the input area also. At present when I click the buttons to add data it clears the text field (input area).</div>
</td></tr></tbody></table></blockquote><div><br></div><div>Well, to append text to an FXText widget, you can use the FXText#appendText method. If it's an FXTextField, you'd need to grab the current text field content, add the new content to it, and then set it back to the FXTextField, e.g.</div>
<div><br></div><div> text_field.text = text_field.text + "some appended text"</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0">
<tbody><tr><td valign="top" style="font:inherit"><div>My second question is, how do I get the GUI to respond to new lines being entered into the text area (input area)? Each time a line is filled or the user hits the enter/return button I want the time to entered into the date area for the corresponding line in the input area for example</div>
<div><br></div><div>INPUT AREA
DATE AREA</div><div>this is my data, i am the user (USER HITS ENTER FOR NEW LINE) Date value</div></td></tr></tbody></table></blockquote>
<div><br></div><div>I think the easiest way would be to listen for either the SEL_INSERTED or SEL_CHANGED message from the FXText widget; see the API documentation for more information:</div><div><br></div><div> <a href="http://www.fxruby.org/doc/api/classes/Fox/FXText.html">http://www.fxruby.org/doc/api/classes/Fox/FXText.html</a></div>
<div><br></div><div>Hope this helps,</div><div><br></div><div>Lyle</div></div>