Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8548551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:31:23+00:00 2026-06-11T13:31:23+00:00

when an entry in a Tk::HList is selected by a single click, a dotted

  • 0

when an entry in a Tk::HList is selected by a single click, a dotted line is drawn around this entry. I don’t want to have this line. How can I configure it? I don’t see any documented way to do it.

Here is some example code showing a Tk::HList with a pre-selected entry. When you click the entry, a dotted line will appear.

#!perl

use strict;
use warnings;
use utf8;
use Tk;
use Tk::HList;

my $mw = tkinit();

# -- create a Tk::HList
my $scrolled_hlist = $mw->Scrolled('HList',
    -scrollbars => 'se',
    -columns => 2,
    -header => 1,
    -width => 50,
    -height => 20,
    # hide black border around HList when it's active
    -highlightthickness => 0,
    -selectborderwidth => 1,
    -selectmode => 'single',

)->pack(-fill => 'y', -expand => 1,);

my $real_hlist = $scrolled_hlist->Subwidget('scrolled');


# -- add HList header colums
$real_hlist->header(
    'create', 0,
    -text   => 'first column',
);

$real_hlist->header(
    'create', 1,
    -text   => 'second column',
);


# -- add some entries to the HList
$real_hlist->add(1);
$real_hlist->item('create', 1, 0, -text => 'first row, 1st col');
$real_hlist->item('create', 1, 1, -text => 'first row, 2nd col');

$real_hlist->add(2);
$real_hlist->item('create', 2, 0, -text => '2nd row, 1st col');
$real_hlist->item('create', 2, 1, -text => 'second row, 2nd col');


# -- set selection *** without dashed line border ***
$real_hlist->selectionSet(2);

$mw->MainLoop();
exit(0);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:31:25+00:00Added an answer on June 11, 2026 at 1:31 pm

    It took some time to find it, but the solution is to call anchorClear() as browsecmd:

    #!perl
    
    use strict;
    use warnings;
    use utf8;
    use Tk;
    use Tk::HList;
    
    my $mw = tkinit();
    
    # -- create a Tk::HList
    my $scrolled_hlist = $mw->Scrolled('HList',
        -scrollbars => 'se',
        -columns => 2,
        -header => 1,
        -width => 50,
        -height => 20,
        # hide black border around HList when it's active
        -highlightthickness => 0,
        -selectborderwidth => 1,
        -selectmode => 'single',
    )->pack(-fill => 'y', -expand => 1,);
    
    my $real_hlist = $scrolled_hlist->Subwidget('scrolled');
    $real_hlist->configure(
        -browsecmd => [ sub{ $_[0]->anchorClear(); }, $real_hlist],
    );
    
    # -- add HList header colums
    $real_hlist->header(
        'create', 0,
        -text   => 'first column',
    );
    
    $real_hlist->header(
        'create', 1,
        -text   => 'second column',
    );
    
    
    # -- add some entries to the HList
    $real_hlist->add(1);
    $real_hlist->item('create', 1, 0, -text => 'first row, 1st col');
    $real_hlist->item('create', 1, 1, -text => 'first row, 2nd col');
    
    $real_hlist->add(2);
    $real_hlist->item('create', 2, 0, -text => '2nd row, 1st col');
    $real_hlist->item('create', 2, 1, -text => 'second row, 2nd col');
    
    
    # -- set selection *** without dashed line border ***
    $real_hlist->selectionSet(2);
    
    $mw->MainLoop();
    exit(0);
    

    Source: https://groups.google.com/d/topic/comp.lang.perl.tk/iCE7ql2Bw4E/discussion

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry, I'm new to flash I have this line of code: BaseEntry( _entryList[i] ).topTeamName
This entry appears to be about 80% of what I want to do but
I want to make an application with plugins that also can have plugins (which
I want to make an entries :: Map(String -> Entry) so I can easily
I have a single entry output from a paradox table which is imported into
How can I get entry nodes from this feed http://www.google.com/alerts/feeds/14392773026536511983/5526937985735563348 I tried linq to
I have this class Entry... public class Entry <K, V> { private final K
I got the following entry in my database: images/test.jpg I want to trim the
What formats can an entry be read in? The only one I could find
I have a timestamp entry of 4 students answering an online questionnaire in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.