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

Home » Public Forums » archive » Compound widgets
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
Compound widgets [message #13082] Wed, 14 October 1998 00:00 Go to next message
Paul Crossley is currently offline  Paul Crossley
Messages: 1
Registered: October 1998
Junior Member
Is it possible to change the sensitivity of an individual object inside
a compound form widget (cw_form), I can change the sensitivity of the
whole form, but not individual components (i.e. textbox)...any ideas ?

Thanks

Paul
Re: Compound widgets [message #13176 is a reply to message #13082] Wed, 14 October 1998 00:00 Go to previous messageGo to next message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Paul Crossley wrote:
>
> Is it possible to change the sensitivity of an individual object inside
> a compound form widget (cw_form), I can change the sensitivity of the
> whole form, but not individual components (i.e. textbox)...any ideas ?
>
> Thanks
>
> Paul

Paul -

Sure. Just use the IDS=ids keyword to return the widget ID's of the
widget elements of the form, and use

widget_control, ids[i], sensitive=0

to control the sensitivity of the individual widgets.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
Re: Compound Widgets [message #67789 is a reply to message #13082] Mon, 31 August 2009 07:08 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bill writes:

> I've been creating my own widgets sucessfully for a while but want
> to leverage existing compound widgets for common tasks (duh). My
> problem is I do not understand how to incorporate them into my
> applications -- for example, I would like to use the cw_light_editor.
>
> I add it to a base widget (triggered by a menu event):
>
> Pro edit_lighting, event
>
> ;Retreive pointer to structure of parameters to be passed between
> events
> Widget_Control, event.top, GET_UVALUE=info
>
> ;Create base widget for light editor
> lightingBase=Widget_Base(COLUMN=1, TITLE='Lighting', GROUP_LEADER=
> (*info).tlb, UNAME='lightingBase')
>
> ;Create compound widget, add my light object
> lightEditor = cw_light_editor(lightingBase, light=(*info).oLight0)
>
> ;Realize the base/compound widget
> Widget_Control, lightingBase, /REALIZE
>
> End
>
> My light object is simply:
>
> ;Create light object (oLight0 is added to the parameter structure)
> oLight0 = Obj_New('IDLgrLight')
>
> ;Set some properties
> oLight0->SetProperty, $
> INTENSITY= 0.500000, $
> LOCATION= [10.0000000, 10.0000000, 20.0000000], $
> TYPE= 2 ;Directional
>
> ;Add the light to my model object
> oModel->Add, oLight0
>
> When I run this, my application freezes and IDL throws a fatal error.
>
> What am I doing wrong? I've looked at the xdice.pro example and David
> Fanning's book, but still can't figure out what is going on.

I don't know. I had to add an XMANAGER to your code to get
the Light Editor to work on my Windows machine. It doesn't
freeze or throw a fatal error. Of course, it doesn't update
the display as I finagle the lights, but I pretty much
expected that. I have to cause an event in my main application
to make the change "take". But it does seem to do that.

One alternative, I guess, would be to use the CW_Light_Control
compound widget you can find embedded into FSC_Surface:

http://www.dfanning.com/programs/fsc_surface.pro

It is not as sophisticated as the ITTVIS one, but it does
give you the ability to turn lights on/off, set the intensity,
and change their color. And the events can propagate to the
"parent" so that updates are instantaneous.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Compound Widgets [message #67793 is a reply to message #13082] Sun, 30 August 2009 11:16 Go to previous message
weclifton is currently offline  weclifton
Messages: 12
Registered: May 2007
Junior Member
On Aug 29, 10:03 am, David Fanning <n...@dfanning.com> wrote:
> Bill writes:
>>    I've been creating my own widgets sucessfully for a while but want
>> to leverage existing compound widgets for common tasks (duh). My
>> problem is I do not understand how to incorporate them into my
>> applications -- for example, I would like to use the cw_light_editor.
>
> I'm just walking out the door to play tennis, but does
> adding an XMANAGER call just after you realize the
> compound widget help at all?
>
> If so, I'll explain my theory later. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

David,

I inserted a call to XMANAGER immediately after realizing the base
widget, but encounter the same fatal error.
The XMANAGER call was:

XMANAGER,'edit_lighting', lightingBase, GROUP_LEADER =(*info).tlb, /
NO_BLOCK

Is this call correct?

Thanks,
Bill
Re: Compound Widgets [message #67797 is a reply to message #13082] Sat, 29 August 2009 07:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Bill writes:

> I've been creating my own widgets sucessfully for a while but want
> to leverage existing compound widgets for common tasks (duh). My
> problem is I do not understand how to incorporate them into my
> applications -- for example, I would like to use the cw_light_editor.

I'm just walking out the door to play tennis, but does
adding an XMANAGER call just after you realize the
compound widget help at all?

If so, I'll explain my theory later. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Automatically Register GeoTIFF Images
Next Topic: Running startup.pro in IDL 7/Workbench/Windows

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

Current Time: Fri Oct 10 09:59:02 PDT 2025

Total time taken to generate the page: 2.23963 seconds