MathGroup Archive 2008

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

Search the Archive

Truncated MathPanel Output

(Sorry if this is a duplicate, I got disconnected on form submission).

I'm having difficultly presenting large graphics (ie. a table of data,
with presented width > 600 px) in a GUIKit MathPanel object, when the
function to present such data is called from a GUIKit action (ie.
inside a Script[] wrapper).  The resulting graphics are truncated at
some arbitrary width, and/or are just a complete mess.

Here is some code to reproduce the problem:

(*our function which will create a window with a button, which when
pressed, will call passed function from the gui's thread*)
gui[f_] :=
    "Button", {"Text" -> "Go!", BindEvent["Action", Script[f[]]]}],
   IncludedScriptContexts -> {"Global`"}]

(*our presentation function, which creates a new window to display
present[q_] :=
    "MathPanel", {"MathCommand" -> ToString[q, InputForm],
     "PreferredSize" ->
      Widget["Dimension", {"Width" -> 1000, "Height" -> 400}]}]];

(*create some data*)
m = RandomReal[{0, 1}, {20, 20}];

(*our data presented in some fancy way*)
rep = Grid[m, Frame -> All];

Now to see the problem, compare the output of the following:

1. rep
2. present[rep]
3. gui[present[rep]&] (you'll need to click the button in this case)

  • Prev by Date: Re: mathematica 6.0.3 and mac os x 10.5.5 crashes?
  • Next by Date: Re: Changing names of variables in a loop
  • Previous by thread: Re: Crash in PNG.exe
  • Next by thread: Re: How to collect terms based the total power of x and y in (x +