Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: [Tkx] Scrolled frame problem

by sebapabst (Acolyte)
on Feb 16, 2010 at 22:16 UTC ( [id://823558]=note: print w/replies, xml ) Need Help??


in reply to Re^3: [Tkx] Scrolled frame problem
in thread [Tkx] Scrolled frame problem

I changed it this way :

my $pageValidation = $fenetre3->new_ttk__frame(-padding => "20 30 5 5" +); $pageValidation->g_grid(-column => 0, -row => 0, -sticky => "news"); $pageValidation->configure(-height => 300, -width => 300); my $logcontent; my $logfrm = $pageValidation->new_ttk__frame(-padding => "5 5 5 5"); $logfrm->g_grid(-column => 1, -row => 1, -sticky => "news"); $logfrm->configure(-borderwidth => 2, -relief => "sunken", -height => +300, -width => 605); $logfrm->g_grid_propagate(0); my $loglbl = $logfrm->new_ttk__label(-textvariable => \$logcontent, -w +raplength=>590); $loglbl->g_grid( -column => 0, -row => 0, -sticky => "new",-padx=>0, - +pady=>0, ); $loglbl->configure(-width=>98,); my $s = $pageValidation->new_ttk__scrollbar(-orient => 'vertical', -co +mmand => [$logfrm, 'yview']); $logfrm->configure(-yscrollcommand => [$s, 'set']); my $boutConfirmation = $pageValidation->new_ttk__button( -text => "La +ncer Conversion", -command => sub {lancerApplication(\$logcontent,\%g +eneraloptions)}); $boutConfirmation->g_grid( -column => 1, -row => 3, -sticky => "sw", - +pady => 7); sub lancerApplication{ my %generaloptions = %{$_[1]}; my $optionsfile='generalOptions.txt'; my $paramsfile='parametersForTEICorpus.txt'; my $refgeneraloptions= \%generaloptions; if ($generaloptions{'externaloptions'}){ $optionsfile=$generaloptions{'filename'}; } else{ ecrireoptgen ($_[1]); } &ma_fonction::main($optionsfile,$paramsfile,\$_[0]); }

I have got no more the precedent error. The program opens correctly, but I still can't see the scrollbar.

Any suggestion? BTW, thanks for your answers!

Replies are listed 'Best First'.
Re^5: [Tkx] Scrolled frame problem
by pobocks (Chaplain) on Feb 17, 2010 at 07:55 UTC

    I believe someone said earlier that the Label widget doesn't take a scrollbar. Personally, I'd use a Text (set to read-only) instead of a label.

    Alternately, check out the Pane widget - here's a discussion, albeit using Perl/Tk, rather than Tkx.

    for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

      Hi! I have used a text widget and now it works.

      My intention was to show the log file on a window, so I had to create a little function to enable, write and then disable the widget, but it was pretty easy. So I woud like to thank you for your help and thank everybody who tried to help me!

      Now I've got another question but it's about a totally different subject, so I'm going to post it with another title. Bye!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-16 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found