Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Is there some limit to the max num of widgets in perl tk?

by Eradicatore (Monk)
on Nov 21, 2007 at 06:47 UTC ( [id://652072]=note: print w/replies, xml ) Need Help??


in reply to Re: Is there some limit to the max num of widgets in perl tk?
in thread Is there some limit to the max num of widgets in perl tk?

Well, yes, I should have explained my reason as well. And maybe this is a bad idea. I was going to use them not as actual labels, but instead as a sort of spectrum display. Similar to one used on music players, but my data is not audio in this case. Anyway, I need about 100 on the x axis and 60+ on the y. so that's more than 4000 labels. I did the same thing with buttons and it failed the same exact way. Any suggestions maybe for a different way to have a 60x100 grid of items? I suppose I could do some sort of curses/ascii display, but I was hoping to have it more tk-ish.

Justin Eltoft

"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews

  • Comment on Re^2: Is there some limit to the max num of widgets in perl tk?

Replies are listed 'Best First'.
Re^3: Is there some limit to the max num of widgets in perl tk?
by Eradicatore (Monk) on Nov 21, 2007 at 07:07 UTC
    Well, now that I think about it, I could try vertical progress bars like this:
    $main_data2_f = $mw->Frame()->pack(-side=>'top'); $vprog = $main_data2_f->ProgressBar( -width => 6, -length => 400, -anchor => 's', -from => 0, -to => 60, -gap => 2, -blocks => 60, -colors => [0, 'green', 50, 'yellow' , 55, 'red'], -variable => \$percent_done )->pack(-anchor=>'s'); $percent_done=55;
Re^3: Is there some limit to the max num of widgets in perl tk?
by strat (Canon) on Nov 21, 2007 at 07:36 UTC

    What about using Tk::Canvas instead of the labels?

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Re^3: Is there some limit to the max num of widgets in perl tk?
by Anonymous Monk on Nov 21, 2007 at 09:08 UTC
    TableMatrix?
Re^3: Is there some limit to the max num of widgets in perl tk?
by roboticus (Chancellor) on Nov 21, 2007 at 14:28 UTC
    Eradicatore:

    Update: ...and if I'd learn to read the entire thread before posting, I'd've seen that you already thought of a better hack, and zentara already provided a nice starting point to a nice way to do it. IGNORE THIS POST!

    * UGLY HACK ALERT * If you're offended by hacks, STOP READING NOW!

    I'm no UI guy, so I would cheat with a hack: Instead of making a grid of labels (I assume you're just changing their color to draw the spectrum?), you could make a simple linear array off 100 of them, and simply change their heights. This will let you get the job done with fewer labels, and fewer operations (rather than update 4000 labels, you need only update 100), so you could get a better repetition rate.

    ...roboticus

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://652072]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-19 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found