|
Re: get image from widget_draw [message #54369 is a reply to message #54256] |
Fri, 01 June 2007 15:39  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On Jun 1, 12:13 pm, "skymaxw...@gmail.com" <skymaxw...@gmail.com>
wrote:
> i'm not sure...you mean this one ?
>
> IF (widget EQ 'button_save') THEN BEGIN
> ;image=TVRD(TRUE=1)
> WIDGET_CONTROL,pic,GET_UVALUE=image
> ;help,image
>
> ENDIF
>
> IF (widget EQ 'button_show') THEN BEGIN
> ;TVSCL,image,TRUE=1
> WIDGET_CONTROL,pic,SET_UVALUE=image
> ENDIF
More like:
if (widget eq 'button_save') then begin
widget_control, pic, set_uvalue=image
endif
if (widget eq 'button_show') then begin
widget_control, pic, get_uvalue=image
tvscl, image, true=1
endif
But I wouldn't put "image" directly in the uvalue, I would put it my
state structure or whatever equivalent you are using.
Mike
--
www.michaelgalloy.com
|
|
|
|