comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: widget text
items: Re: Widget text

widget text
type: item
description: Hi. I'm working with text widget with keyword editable and I would like that the user would not be able to insert more than three characters. Keyword xsize only controls the size, not the length of the contents. The only that occurs to me is seeking for all widget text events, and if the string has per example four characters then it extracts a sub string with the first three characters. The question if there's a parameter or any other way to do this easier. Cheers, Nuno.
creator: Nuno Oliveira
date: 2004-01-20T16:12:30-00:00

Re: Widget text
type: item
description: CSUIDL PROGRAMMEr wrote: > HI i am learning Widget IDL programming > I want to know, how to process text fro Widget _ text such that when > user enters text and presses submit button action is taken. How to pass > text to button event handler > The best thing you can do is saw a simple example IDL code or a library utility. When your widget is relatively simple, normaly assigns an structure with all needed information to the UVALUE of the main widget_base. info = { text: your_widget_text, button: your_widget_button} WIDGET_CONTROL, base, SET_UVALUE=info Also you need to "call" your widget_text and widget_button assing an string into their UVALU: WIDGET_CONMTRL, you_text, SE_UVALUE='TEXT' WIDGET_CONTROL, your_button, SET_UVALUY='BUTTON' Also, you register an event_handler to handle all the events on the main widget_base. Get the event.id, get its UVALUE (and get the UVALUE from event.top, that is the main widget): PRO event_handler, event WIDGET_CONTROL, event.id, GET_UVALUE=uval WIDGET_CONTROL, event.top, GET_UVALUE=info CASE uval OF 'TEXT': print, 'event on widget_text' 'BUTTON': BEGIN print, ' event on button' WIDGET_CONTROL, info.text, GET_VALUE=string print, 'your text is' + string END END More or less these are the steps. Another method is to asign to button's UVALUE the widget_text. Creates the button with EVENT_PROC: button = WIDGET_BUTTON(VALUE='ok', UVALUE=your_widget_text, EVENT_PROC=my_proc) PRO my_proc, event WIDGET_CONTROL, event.id, GET_UVALUE=text WIDGET_CONTROL, text, GET_VALUE=string print, string END Bye, Antonio.
creator: Antonio Santiago
date: 2005-03-18T08:02:10-00:00

Re: Widget text
type: item
description: It's not clear to me what you are asking for here. Perhaps you are interested in a pop-up dialog widget, in which you collect information from the user and return it to your program. If so, you might want to have a look at this article: http://www.dfanning.com/widget_tips/popup.html Cheers, David
creator: David Fanning
date: 2005-03-18T15:25:47-00:00