Compound widgets [message #13082] |
Wed, 14 October 1998 00:00  |
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 #67789 is a reply to message #13082] |
Mon, 31 August 2009 07:08  |
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  |
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  |
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.")
|
|
|