Question about selecting images from Draw Widgets [message #53059] |
Fri, 16 March 2007 10:05  |
gearoid.k
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
Hello
I am designing GUI, I have multiple draw widgets on screen at one
time. I am able to select the desired widget and find its ID but
cannot get access to the image that it is showing. For example, when a
user clicks on a draw widget, it takes that image and displays it in a
larger window. I imagine the code might look something like this:
;************begin
;Find the display widget that contains the desired image
wDISPLAY_IMAGE_1 = WIDGET_INFO(Event.top,
FIND_BY_UNAME='DISPLAY_IMAGE_1');
;Make sure something was found.
IF(wDISPLAY_IMAGE_1 GT 0)THEN BEGIN
;code to assign the variable 'image' to the contents of
DISPLAY_IMAGE_1
ENDIF
;Now find main display
wMAIN_DISPLAY = WIDGET_INFO(Event.top,
FIND_BY_UNAME='MAIN_DISPLAY');
;Make sure something was found.
IF(wMAIN_DISPLAY GT 0)THEN BEGIN
;Resize image for larger display
image = CONGRID(image, 512, 512)
TV, image
ENDIF
;***************END
I am aware I can set the u_value to the image but this does not work
if I wish to use a few different images.
Any help would be greatly appreciated.
-Ger.
|
|
|
Re: Question about selecting images from Draw Widgets [message #53126 is a reply to message #53059] |
Mon, 19 March 2007 14:42   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rick Towler writes:
> I used to agree with this, David, but ... I think the
> most egregious GUI builder offenses have been addressed. That being
> said, it isn't perfect.
You are the second person whose opinion I respect who has
mentioned this to me. Perhaps it's time for a closer look.
> We do agree that the lack of an formal method for passing information
> around is a real problem and is probably the biggest obstacle to new
> users.
I think this is my chief complaint, too. Without it, the user
has to learn more than they want to know about widget programming,
and if you are doing THAT, then there are probably better ways to
write the program. At least, that's what I've always believed.
If I get some time, I might have another look.
> But I think it is important that
> instead of urging people not to use it, that we should urge people *to*
> use it and provide feedback to ITT so we can move out of the GUI stone age.\
It could be timely. As I understand it, ECLIPSE often has
hooks into GUI builders for other programming languages.
Maybe this is something that is, or could be, considered
for the Big Transition. :-)
> In the end, building applications with a decent GUI is hard work whether
> using the GUI builder or doing it the hard way but I think with a proper
> GUI builder we'll end up ahead more often than not.
I guess it depends on what your definition of "ahead" is
going to be. But if the end result is a program that is
easy to maintain and extend, I'm all for it, too.
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: Question about selecting images from Draw Widgets [message #53178 is a reply to message #53126] |
Fri, 23 March 2007 07:29  |
gearoid.k
Messages: 6 Registered: March 2007
|
Junior Member |
|
|
On Mar 19, 9:42 pm, David Fanning <n...@dfanning.com> wrote:
> Rick Towler writes:
>> I used to agree with this, David, but ... I think the
>> most egregious GUI builder offenses have been addressed. That being
>> said, it isn't perfect.
>
> You are the second person whose opinion I respect who has
> mentioned this to me. Perhaps it's time for a closer look.
>
>> We do agree that the lack of an formal method for passing information
>> around is a real problem and is probably the biggest obstacle to new
>> users.
>
> I think this is my chief complaint, too. Without it, the user
> has to learn more than they want to know about widget programming,
> and if you are doing THAT, then there are probably better ways to
> write the program. At least, that's what I've always believed.
> If I get some time, I might have another look.
>
>> But I think it is important that
>> instead of urging people not to use it, that we should urge people *to*
>> use it and provide feedback to ITT so we can move out of the GUI stone age.\
>
> It could be timely. As I understand it, ECLIPSE often has
> hooks into GUI builders for other programming languages.
> Maybe this is something that is, or could be, considered
> for the Big Transition. :-)
>
>> In the end, building applications with a decent GUI is hard work whether
>> using the GUI builder or doing it the hard way but I think with a proper
>> GUI builder we'll end up ahead more often than not.
>
> I guess it depends on what your definition of "ahead" is
> going to be. But if the end result is a program that is
> easy to maintain and extend, I'm all for it, too.
>
> 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.")
Thanks a lot for your help!
|
|
|