Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Tk configure in Tkx

by Marinochka (Initiate)
on Jan 29, 2013 at 07:47 UTC ( #1015820=perlquestion: print w/replies, xml ) Need Help??
Marinochka has asked for the wisdom of the Perl Monks concerning the following question:

Hi! I'm newcomer in Perl. I'm trying to make a programm using Tkx. But there is a promlem: I made a table using "tktable", but I can't use some configure options like "-selectbackground" (It says unknown option). Can maybe someone advise me how to use such options or how can I solve this problem an other way (I need to change default color of foreground or background when cell is selected)?

use strict; use Tkx; Tkx::package_require("Tktable"); my $mw = Tkx::widget->new('.'); $mw->g_wm_title("Name of the window"); my $frame = $mw->new_frame(); $frame->configure( -borderwidth => 4, -relief => 'groove', ); $frame->g_pack(); my $guess_tab = $frame->new_table( -rows => 7, -cols => 4, -cache => 1, -resizeborders => 'none', -titlecols => 1, -titlerows => 1, -variable => \%guess, ); $guess_tab->g_pack(); Tkx::MainLoop();

Replies are listed 'Best First'.
Re: Tk configure in Tkx
by zentara (Archbishop) on Jan 29, 2013 at 10:40 UTC
    First, don't mix up Tk and Tkx, they are different enough that you cannot expect the options to be available cross-language boundaries. Limitations with Tkx configure options? might be enlightening for you.

    P.S. I'm not familiar with Tkx, but I think you want to look for, or set, the "active" color in your theme settings.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Re: Tk configure in Tkx (tcl/tk is tcl/tk, configure is configure, widgets either have options or they don't)
by Anonymous Monk on Jan 29, 2013 at 08:22 UTC

    What is this "-selectbackground" option and in what documentation did you read about it?

      If I understand correctly, Tkx has the same options as Tcl (and they differ only in syntax). Such option as "selectbackground" I've found in standard options supported by widgets ( Maybe I'm wrong (it's my first experience in using Perl and even in programming). But I'd like to understand if it's possible to solve my problem any way :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1015820]
Approved by vinoth.ree
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2018-05-26 00:40 GMT
Find Nodes?
    Voting Booth?