GUIKit and VisibleRect
- To: mathgroup at smc.vnet.net
- Subject: [mg52549] GUIKit and VisibleRect
- From: pdickof at scf.sk.ca (Peter Dickof)
- Date: Wed, 1 Dec 2004 05:58:51 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
The following draws a little plot and shows the associated visible rectangle: ref = GUIRun[ Widget["Frame", {Widget["ImageLabel", {"data" -> Script[ExportString[ Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}, DisplayFunction -> Identity], "GIF", ImageSize -> 300, ConversionOptions -> {"Transparency" -> GrayLevel[1]}]] }, Name -> "myImageLabel"]}, Name -> "myFrame"]]; (ref@PropertyValue[{"myImageLabel", "VisibleRect"}])@toString[] (ref@PropertyValue[{"myImageLabel", "Bounds"}])@toString[] The following resizes the frame and puts a bigger image into it. The visible rectangle is not updated. It is also not writable. ref @ Script[ newData = ExportString[ Plot3D[Sin[2x y], {x, 0, Pi}, {y, 0, Pi}, DisplayFunction -> Identity], "GIF", ImageSize -> 500, ConversionOptions -> {"Transparency" -> GrayLevel[1]}]; SetPropertyValue[{"myImageLabel", "data"}, newData]; SetPropertyValue[{"myFrame", "Size"}, Widget["Dimension", {"width" -> 600, "height" -> 500}]]; ] (ref@PropertyValue[{"myImageLabel", "VisibleRect"}])@toString[] (ref@PropertyValue[{"myImageLabel", "Bounds"}])@toString[] A mouse resize will fix this. How do I do that with a program? Thanks for your help. Peter Dickof
- Follow-Ups:
- Re: GUIKit and VisibleRect
- From: Jeff Adams <jeffa@wolfram.com>
- Re: GUIKit and VisibleRect