@@ -123,20 +123,21 @@ proc Examples::PrintGroups { } {
123123 foreach example_id [dict keys [dict get $group examples]] {
124124 set example [dict get $group examples $example_id ]
125125 if {[IsAproved $example $group_name $filter ]} {
126+ set inner_id " $group_id *$example_id "
126127 set example_name [subst -nocommands -novariables [dict get $example name]]
127128 set example_logo [dict get $example logo]
128129 set example_dim [dict get $example dim]
129130 set example_app [dict get $example app]
130131 set example_cmd [dict get $example cmd]
131132 set img [Examples::getImgFrom $example_app $example_logo ]
132- ttk::button $buttons_frame .img$example_id -image $img -command [list Examples::LaunchExample $example_app $example_dim $example_cmd ]
133+ ttk::button $buttons_frame .img~ $inner_id -image $img -command [list Examples::LaunchExample $example_app $example_dim $example_cmd ]
133134 ttk::label $buttons_frame .title$example_id -text $example_app -font {bold}
134135 ttk::label $buttons_frame .text$example_id -text $example_name
135- grid $buttons_frame .img$example_id -column $col -row $row
136+ grid $buttons_frame .img~ $inner_id -column $col -row $row
136137 grid $buttons_frame .title$example_id -column $col -row [expr $row +1]
137138 grid $buttons_frame .text$example_id -column $col -row [expr $row +2]
138139
139- bind $buttons_frame .img$example_id <Enter> {::Examples::PlaceInformationWindowByPath %W}
140+ bind $buttons_frame .img~ $inner_id <Enter> {::Examples::PlaceInformationWindowByPath %W}
140141
141142 incr col
142143 if {$col >= 4} {set col 0; incr row; incr row; incr row}
@@ -158,9 +159,13 @@ proc Examples::PrintGroups { } {
158159}
159160
160161proc Examples::PlaceInformationWindowByPath {win_path} {
161- set example_id [string trimleft $win_path .gid.examples_window.center.c.fcenter.title_textFluid.buttonframe.img]
162- set example [::Examples::getExampleById $example_id ]
162+ variable examples_window
163+ variable groups_of_examples
164+ set inner_id [lindex [split $win_path " ~" ] end]
165+ lassign [split $inner_id " *" ] example_group example_id
166+ set example [dict get $groups_of_examples $example_group examples $example_id ]
163167 if {$example ne " " } {
168+ $examples_window .info configure -text " Information: [ dict get $example name] "
164169 set description [dict get $example description]
165170 set ::Examples::info_main_window_text $description
166171 }
0 commit comments