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

Home » Public Forums » archive » Help! Multiple widget objects in 1 program, sample code
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Help! Multiple widget objects in 1 program, sample code [message #21007] Wed, 02 August 2000 00:00
craigni is currently offline  craigni
Messages: 2
Registered: August 2000
Junior Member
Help!

I have a need to *not* have all my widgets in one giant clump. I've been knocking my head against the wall for a while
on this. How can I make the sample code below close all open widgets when I hit the "Quit" button? Right now, only the
"firstBase" widget object closes, and the "secondBase" widget object remains open.

T MUCH IA,
Craig

craigni - @ - worldnet.att.net
(cut out the -s and the @)

; Program to illustrate my problem

PRO main_event, event

WIDGET_CONTROL, event.id, GET_VALUE = value, GET_UVALUE = uvalue

COMMON data, inputField, outputField

case uvalue of

'Get': begin
WIDGET_CONTROL, inputField, GET_VALUE = value, /REALIZE
WIDGET_CONTROL, outputField, SET_VALUE = value, /REALIZE
end

'Quit': WIDGET_CONTROL, event.top, /DESTROY

endcase

end

; -----------------

PRO problem, GROUP_LEADER = group_leader

COMMON data, inputField, outputField

firstBase = WIDGET_BASE( GROUP_LEADER = group_leader )
secondBase = WIDGET_BASE( GROUP_LEADER = group_leader )

firstColumn = WIDGET_BASE( firstBase, /COLUMN )
secondColumn = WIDGET_BASE( secondBase, /COLUMN )

getButton = WIDGET_BUTTON( firstColumn, VALUE = 'Get', UVALUE = 'Get' )

inputField = CW_FIELD( secondColumn, TITLE = 'Number:' )
outputField = CW_FIELD( firstColumn, TITLE = 'Number:', /NOEDIT )

quitButton = WIDGET_BUTTON( firstColumn, VALUE = 'Quit', UVALUE = 'Quit' )

WIDGET_CONTROL, firstBase, /REALIZE
WIDGET_CONTROL, secondBase, /REALIZE

XMANAGER, 'main', firstBase, GROUP_LEADER = group_leader

end
[Message index]
 
Read Message
Previous Topic: problems with MODAL widgets and non-modal sub-widgets
Next Topic: Call for Political Action (Was: Top 10 List)

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

Current Time: Sun Oct 12 07:02:04 PDT 2025

Total time taken to generate the page: 0.72167 seconds