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

MathGroup Archive 2008

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

Search the Archive

Truncated MathPanel Output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92223] Truncated MathPanel Output
  • From: Raffy <raffy at mac.com>
  • Date: Tue, 23 Sep 2008 07:34:06 -0400 (EDT)

(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_] :=
 GUIRun[Widget[
    "Button", {"Text" -> "Go!", BindEvent["Action", Script[f[]]]}],
   IncludedScriptContexts -> {"Global`"}]

(*our presentation function, which creates a new window to display
data*)
present[q_] :=
  GUIRun[Widget[
    "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 +