Reputation: 231
grid [listbox $dumpfile_lb \
-xscrollcommand "$frame_w.srl_x set" \
-yscrollcommand "$frame_w.srl_y set" \
-width 120 -height 20 \
-activestyle none -bg ghostwhite \
-exportselection 0 -font {courier -14 bold}] \
-row 1 -column 0 -sticky news
this is my listbox when highlighting line in listbox that line should be change in bold how do i do that
here i am using the font but it will change the all lines instead of changing all lines when highlighting any line in listbox that line should be change and all lines remains same how can i do that
can any one tell that
Upvotes: 0
Views: 310
Reputation: 137787
The listbox widget makes a number of simplifying assumptions to keep its rendering algorithms manageable. One of these is that the same font is used throughout (and making things bold requires a font change).
Your options are to either stick to using the things that you can change on a listbox (just the colours, really) or to switch to a different widget. The text
widget, ttk::treeview
and (at a pinch) canvas
can all pretend to be the sort of rich list box that you're after, though with a substantial amount of effort.
A third-party widget (maybe the tablelist?) might be able to do what you want with less effort, though those often get quite complicated in their own right.
Upvotes: 1