|
Re: Como unir la interfaz garfica con los procedimientos [message #45105 is a reply to message #45103] |
Fri, 12 August 2005 14:50   |
David
Messages: 24 Registered: April 1997
|
Junior Member |
|
|
Hola Anto,
En el ejemplo de Haje, WIDGET_CONTROL no es un event, pero un
procedure (una instruccion). Hace muchas cosas. La usas usualmente para
especificar y cambiar los atributos de los widgets. Tambien hay una
instruccion (un function) llamada WIDGET_INFO que te da muchos tipos de
informacion de los widgets que has creado.
Todas los procedures cuyos nombres empiezan con WIDGET_ (salvo
WIDGET_CONTROL y WIDGET_INFO) puedes usar para crear los elementos del
GUI (como botones, menus, texto, etc.).
Si quieres que tu GUI tenga events, necesitas el procedure XMANAGER. El
primer parametro de XMANAGER es cualquier string que quieras, pero
necesitas implementar un procedure en tu programa con este string mas
"_event". En el ejemplo de Haje, el primer parametro es 'widget2', y
tambien el tiene un procedure llamado "widget2_event". El segundo
parametro es el numero de identificacion del 'base widget' (lo mas alto
en la jararquia), en este caso es el variable llamado 'base'.
El procedure que implementas que recibe los events necesite solo un
parametro, que recibira un structure con informacion del event que
occurio.
Cuando se empieza con los GUIs en IDL es un poco confuso, pero no es
muy complicado. Espero que te ayude!
David
|
|
|
Re: Como unir la interfaz garfica con los procedimientos [message #45117 is a reply to message #45105] |
Thu, 11 August 2005 10:02   |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
hola Anto,
"Building IDL Applications" is part of the documentation provided with
IDL. It can be found in your IDL install directory (On windows that is
usually C:\Program Files\RSI\IDL61\help\building.pdf) It can also be
accessed thru the online help system (select Help->Contents on windows
or type "?" on the idl command line.)
WIDGET_CONTROL is a procedure that controls the display and behavior of
GUI objects. In IDL, GUI's are created from a collection of "widgets"
(buttons, lists, text boxes...) so to build a GUI you need to read up on
widgets. The online help supplied with IDL is a great place to start,
assuming that RSI provides the documentation translated into Spanish. :)
-Rick
Anto wrote:
> THANKS Haje Korth
>
> I help to me sou much, The "Building IDL Applications" IS IN INTERNET?,
> AND OTHERS QUESTION How programing a proyect whith a GUI??, tHE
> INSTRUCTION WIDGET_CONTROL is an event?
> I sorry whit my Englihs, i hope understand,...
> ANTO
>
|
|
|
|
Re: Como unir la interfaz garfica con los procedimientos [message #45130 is a reply to message #45127] |
Thu, 11 August 2005 05:26   |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Anto,
the example below is from the "Building IDL Applications" guide and should
give you a basic idea. You can then search the help for all WIDGET_*
commands for other GUI objects.
Haje
PRO widget2_event, ev
WIDGET_CONTROL, ev.TOP, GET_UVALUE=textwid
WIDGET_CONTROL, ev.ID, GET_UVALUE=uval
CASE uval OF
'ONE' : WIDGET_CONTROL, textwid, SET_VALUE='Button 1 Pressed'
'TWO' : WIDGET_CONTROL, textwid, SET_VALUE='Button 2 Pressed'
'DONE': WIDGET_CONTROL, ev.TOP, /DESTROY
ENDCASE
END
PRO widget2
base = WIDGET_BASE(/COLUMN)
button1 = WIDGET_BUTTON(base, VALUE='One', UVALUE='ONE')
button2 = WIDGET_BUTTON(base, VALUE='Two', UVALUE='TWO')
text = WIDGET_TEXT(base, XSIZE=20)
button3 = WIDGET_BUTTON(base, value='Done', UVALUE='DONE')
WIDGET_CONTROL, base, SET_UVALUE=text
WIDGET_CONTROL, base, /REALIZE
XMANAGER, 'widget2', base
END
"Anto" <antok@argentina.com> wrote in message
news:1123762443.929701.41810@g14g2000cwa.googlegroups.com...
James Kuyper wrote:
> Anto wrote:
>> HOLA
>> Alguien seria tan amable y me puede ayudar a ver en un ejemplo sencillo
>> Como hago para enlazar la interfaz grafica GUI con una pantalla con CON
>> LOS .PRO?�?
>> GRACIAS
>> ANTO
>
> <http://www.google.com/language_tools>:
> HELLO Somebody serious so amiable one and can help me to see in a
> simple example Since I make to connect grafica interface GUI with a
> screen with WITH PRO? THANKS ANTO
>
> <http://ets.freetranslation.com/>:
> HELLO Someone serious so kind and can help me to see in a simple
> example As I do to bind the interface grafica GUI with a screen with
> WITH THE .PRO?�? THANKS ANTO
>
> I can't quite figure out what he's asking, from either of the two
> translations.
HELLO
I START WITH THE LANGUAJE AND NEED HELP WITH simples examples to start
programming whit GUI.
Since I speack spanish and it's difficult to me english and the
translations not excactly. (I'm a girl).
THANKS ANTO
|
|
|
|
|
|
|
Re: Como unir la interfaz garfica con los procedimientos [message #45161 is a reply to message #45103] |
Wed, 17 August 2005 10:40  |
David
Messages: 24 Registered: April 1997
|
Junior Member |
|
|
Anto,
Desgraciadamente, no hay documentacion de IDL en castellano. La
documentacion que viene con IDL tiene mucha informacion, pero es en
ingles. Una manera muy buena de aprender el idioma es estudiar los
ejemplos. En la instalacion de IDL, hay un lugar con muchos ejemplos,
incluso ejemplos de los widgets (mira C:\RSI\IDL61\examples\widgets).
Yo aprendi IDL con la documentacion y los ejemplos, y de otras personas
que lo usan.
David
|
|
|