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

Home » Public Forums » archive » default_button
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
default_button [message #19868] Mon, 17 April 2000 00:00
pei zeng is currently offline  pei zeng
Messages: 12
Registered: October 1999
Junior Member
I have a dialog with an OK button which closes the dialog. I would like it
to be a default button, so I can use "RETURN"/"ENTER" key or click using
mouse.
After I run the code, the OK button looks like a normal button(not
highlighted), but it functions like a default button(enter key works). What
is wrong?

The code will look something like this:

PRO default_button, GROUP_LEADER=group

tlb=WIDGET_BASE(COLUMN=1, TITLE="Default Button", $
TLB_SIZE_EVENTS=0, XPAD=0, YPAD=0, /FLOATING, $
/TLB_KILL_REQUEST_EVENTS, GROUP_LEADER=group,/MODAL)
;
; some other widget
;
wOK=WIDGET_BUTTON(tlb,UVALUE='OK', VALUE='OK')
;
; skip other codes
;
; realize the widget

WIDGET_CONTROL, tlb, /REALIZE

; set default button

WIDGET_CONTROL, tlb, DEFAULT_BUTTON=wOK

;run program

XMANAGER, 'default_button', tlb

END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: default_button
Next Topic: IMDISP update

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

Current Time: Wed Oct 08 14:01:41 PDT 2025

Total time taken to generate the page: 0.00539 seconds