Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Truncated GUIKit-MathPanel Output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92274] Re: Truncated GUIKit-MathPanel Output
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Thu, 25 Sep 2008 05:33:08 -0400 (EDT)
  • References: <gbak7e$pa$1@smc.vnet.net>

raffy at mac.com wrote:
> Hello,
> 
> I'm having really strange results when trying to plot or represent
> data in a MathPanel widget.
> 
> When I try to represent a large graphical object (ie. larger than 800
> px wide or so) the MathPanel output will become truncated, regardless
> of the actual dimensions of the MathPanel widget.
> 
> The problem is made worse when the function that creates the MathPanel
> widget and displays the data, is called from an GUIKit event.  Under
> this scenerio, the truncation occurs around 600 px or so.
> 
> Has anyone else experienced this issue?
> Thanks for the help,
> 
> -- Andrew
> 
> This code should demonstrate the issue:
> 
> Needs["GUIKit`"];
> 
> mp[q_] :=
>   GUIRun[Widget[
>     "MathPanel", {"MathCommand" -> ToString[q, InputForm],
>      "PreferredSize" ->
>       Widget["Dimension", {"Width" -> 1000, "Height" -> 400}]}]];
> 
> mp[RandomReal[{10^9, 10^10}, {15, 15}] // TableForm]
> 
> 
First, I notice that Grid squashes the columns as the grid gets wider - 
eventually spilling each entry over two lines. You can avoid this by 
using the ItemSize option, as in the code below. This may be the heart 
of your problem, but in any case, I suggest you try my (free from my 
website) Super Widget Package. This package grew out of my frustration 
with GUIKit, and is much easier to use, reasonably documented, and has 
many more features.

Here is the code using the SWP:

Needs["SuperWidgetPackage`"]
data = Table[Random[], {20}, {20}];
sss = Grid[data, ItemSize -> 6];
SuperWidgetGraphicsPanel[sss] // SuperGUIRunModal

You could add a close button with about one more line of code, but I 
will keep it simple.

You could also use SuperWidgetTable which would produce a scrollable 
(and even editable) table.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Re: A Package Function Tutorial
  • Next by Date: Re: Re: blurry ellipse
  • Previous by thread: Truncated GUIKit-MathPanel Output
  • Next by thread: A Package Function Tutorial