Widget_Draw - Help [message #27339] |
Thu, 18 October 2001 12:55  |
Logan Lindquist
Messages: 50 Registered: October 2001
|
Member |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I figured I would start with something
easy, trying to create widget that displays images
in Widget_Draw. I am trying to pass the wdraw variable in a
Struct to the button procedure event handler. The event handler then calls
a procedure that will hopefully open the file, resize the image and display in
the wdraw window. Right now I am getting an error saying that my wdraw variable
is undefined. Some hints to what I am doing wrong, would be greatly appreciated!
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Widget_Draw creation</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV>
<DIV><FONT face=Arial size=2> wdraw = Widget_Draw(wbase_col, XSize=256,
YSize=256,$<BR> Graphics_Level=2, Expose_Events=1, Retain=0,
$<BR> Event_Func ='image_expose')</FONT></DIV>
<DIV><FONT face=Arial size=2>****</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Creating the Struct </FONT></DIV>
<DIV><FONT face=Arial size=2>****</FONT></DIV>
<DIV><FONT face=Arial size=2>info = { wdraw:wdraw,$<BR>
wid:wid }</FONT></DIV>
<DIV><FONT face=Arial size=2>Widget_Control, wbase, Set_UValue=info,
/No_Copy<BR>*****</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The button event handler code</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV>
<DIV><FONT face=Arial size=2>Widget_Control, event.top, Get_UValue=info,
/No_Copy<BR> selectFile, info.wdraw<BR> Widget_Control,
info.wdraw, Set_UValue=info, /No_Copy<BR>*****</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The file select procedure relating to the finding
the Draw Widget</FONT></DIV>
<DIV><FONT face=Arial size=2>*****</FONT></DIV>
<DIV><FONT face=Arial size=2>Widget_Control, wdraw, Get_Value=wid,
/No_Copy<BR>oldWin = !D.WINDOW<BR>WSET, wid<BR> loadct, 0,
/SILENT<BR>erase,wid<BR>*****</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Logan Lindquist</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="mailto:llindquist@mrdoc.cc">llindquist@mrdoc.cc</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>
|
|
|