comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: CW_FORM woes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CW_FORM woes [message #10260 is a reply to message #10257] Tue, 04 November 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
[This followup was also posted to comp.lang.idl-pvwave]

Irene Barg (barg@nickel.as.arizona.edu) writes:

> Can anyone give me an working example of how to use CW_FORM?

[...Pretty ugly code with COMMON blocks snipped. :-)...]

Here you go.

PRO testform_Event, event
COMMON params, fsize, fname
COMMON b_ids, b

CASE event.tag OF

'OK': begin
Widget_Control, event.id, Get_Value=alltags
fsize = alltags.fsize
fname = alltags.fname
WIDGET_CONTROL, event.top, /DESTROY
end

ELSE: ; Drop through event handler
ENDCASE

END


PRO testform
COMMON b_ids, b
COMMON params, fsize, fname

; describe my form
DESC = [ $
'0, LABEL, Centered Label, CENTER', $
'1, BASE,, ROW, FRAME', $
'0, BUTTON, B1|B2|B3, LABEL_TOP=Nonexclusive:, COLUMN, TAG=bg1', $
'2, BUTTON, E1|E2|E3, EXCLUSIVE, LABEL_TOP=Exclusive:, COLUMN, TAG=bg2',
$
'0, TEXT, , LABEL_LEFT=Enter File name:, WIDTH=12, TAG=fname', $
'0, INTEGER, 0, LABEL_LEFT=File size:, WIDTH=12, TAG=fsize', $
'1, BASE,, ROW', $
'0, BUTTON, OK, QUIT, FONT="helvetica", TAG=OK', $
'2, BUTTON, Cancel, QUIT']

a = WIDGET_BASE(TITLE='Testing IDL forms')

b = CW_FORM(a, desc, /COLUMN)
WIDGET_CONTROL, a, /REALIZE

XMANAGER, 'TESTFORM', a
print, 'Filesize: ', fsize
print, 'Filename: ', fname
END


Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: routine search time
Next Topic: shared colormap

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 05:34:20 PST 2025

Total time taken to generate the page: 0.47700 seconds