in reply to Double-clicking a HList Entry

Selectmode "none" doesn't seem to be documented.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Double-clicking a HList Entry
by andy4321 (Novice) on Mar 31, 2025 at 05:55 UTC

    Thank you for your reply

    The supported options for -selectmode are: single, browse, multiple and extended

    I tried none just to see if it made a difference ... which it didn't.

    I've also tried binding to double-left-click with something like:

    $hlist -> bind("<Double-Button-1>" => \&DoubleClicked); sub DoubleClicked { my @selected = $hlist->selectionGet(); my $entry = $selected[0]; print "DoubleClicked: $entry\n"; $hlist->hide('entry', $entry); $mw->update(); sleep(1); $hlist->show('entry', $entry); }

    The sleep was me just doing a simple experiment to see what would happen (I know Callbacks should complete as quickly as possible).

    I've also noticed that:

    • -selectforeground=>"Red" has no effect when a style is given to a HList entry
    • That is, -selectforeground works fine as long as I don't apply a style.
    • So there is some interaction between the two.

    My next attempt is to delete the HList and re-populate ... which seems a bit extreme.