Bwidget Source Code
Check-in [8344f45961]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:* button.tcl, "BWSlim.Toolbutton" style related change to ensure that a button created with "-style BWSlim.Toolbutton" keeps it's layout
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8344f45961da8b71a2ca3b7c1193ebf5dc168553
User & Date: oberdorfer 2009-09-11 16:04:14
Context
2009-09-16
20:20
demo themes are now bas64 encoded check-in: dd657c58da user: oberdorfer tags: trunk
2009-09-11
16:04
* button.tcl, "BWSlim.Toolbutton" style related change to ensure that a button created with "-style BWSlim.Toolbutton" keeps it's layout check-in: 8344f45961 user: oberdorfer tags: trunk
2009-09-10
19:23
* combobox hottrack motion bug fixed: "after idle" should fix the problem with very long listbox text items which caused under certain circumstances a complete crash (CDE freeze) this happened under AIX5.3 and CDE, running under tcl/Tk 8.4.7,
check-in: f7d90d78d3 user: oberdorfer tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1
2
3
4
5
6





7
8
9
10
11
12
13
# ------------------------------------------------------------------------------
#  ChangeLog
#  This file is part of Unifix BWidget Toolkit
#  $Id: ChangeLog,v 1.213 2009/09/10 19:23:35 oberdorfer Exp $
# ------------------------------------------------------------------------------






2009-09-10 Johann Oberdorfer  <[email protected]>

        * combobox hottrack motion bug fixed:
          "after idle" should fix the problem with very long listbox text items
          which caused under certain circumstances a complete crash (CDE freeze)
          this happened under AIX5.3 and CDE, running under tcl/Tk 8.4.7,



|


>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ------------------------------------------------------------------------------
#  ChangeLog
#  This file is part of Unifix BWidget Toolkit
#  $Id: ChangeLog,v 1.214 2009/09/11 16:04:49 oberdorfer Exp $
# ------------------------------------------------------------------------------

2009-09-11 Johann Oberdorfer  <[email protected]>

        * button.tcl, "BWSlim.Toolbutton" style related change to ensure that
	  a button created with "-style BWSlim.Toolbutton" keeps it's layout	  

2009-09-10 Johann Oberdorfer  <[email protected]>

        * combobox hottrack motion bug fixed:
          "after idle" should fix the problem with very long listbox text items
          which caused under certain circumstances a complete crash (CDE freeze)
          this happened under AIX5.3 and CDE, running under tcl/Tk 8.4.7,

Changes to button.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
...
161
162
163
164
165
166
167
168


169

170
171
172
173
174
175
176
...
223
224
225
226
227
228
229


230

231
232
233
234
235
236
237
# ----------------------------------------------------------------------------
#  button.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: button.tcl,v 1.13 2009/09/08 19:55:45 oberdorfer Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#   Public commands
#     - Button::create
#     - Button::configure
#     - Button::cget
#     - Button::invoke
................................................................................
    # Do some extra configuration on the button
    set relief [Widget::getMegawidgetOption $path -relief]

    if { [string equal $relief "link"] } {
        set relief "flat"
    }
    set var [Widget::getMegawidgetOption $path -textvariable]
    set st [Widget::getMegawidgetOption $path -state]
    if {  ![string length $var] } {
        set desc [BWidget::getname [Widget::getMegawidgetOption $path -name]]
        if { [llength $desc] } {
            set text  [lindex $desc 0]
            set under [lindex $desc 1]
            Widget::configure $path [list -text $text]
            Widget::configure $path [list -underline $under]
................................................................................
        set text  ""
        Widget::configure $path [list -underline $under]
    }


    if { [BWidget::using ttk] } {
         $path configure -text $text -underline $under \
	       -textvariable $var -state $st \


	       -style "${relief}BW.TButton"

    } else {
         $path configure -relief $relief -text $text -underline $under \
	       -textvariable $var -state $st
    }

    bindtags $path [list $path BwButton [winfo toplevel $path] all]

................................................................................
                set relief "raised"
            } else {
                set relief "flat"
            }
        }

        if { [BWidget::using ttk] } {


            $path:cmd configure -style "${relief}BW.TButton" -state $state

        } else {
            $path:cmd configure -relief $relief -state $state
        }
    }

    if { $cv || $cn || $ct || $cu } {
	set var		[Widget::cget $path -textvariable]


|







 







|







 







|
>
>
|
>







 







>
>
|
>







1
2
3
4
5
6
7
8
9
10
11
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
...
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
...
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# ----------------------------------------------------------------------------
#  button.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: button.tcl,v 1.14 2009/09/11 16:04:14 oberdorfer Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#   Public commands
#     - Button::create
#     - Button::configure
#     - Button::cget
#     - Button::invoke
................................................................................
    # Do some extra configuration on the button
    set relief [Widget::getMegawidgetOption $path -relief]

    if { [string equal $relief "link"] } {
        set relief "flat"
    }
    set var [Widget::getMegawidgetOption $path -textvariable]
    set st  [Widget::getMegawidgetOption $path -state]
    if {  ![string length $var] } {
        set desc [BWidget::getname [Widget::getMegawidgetOption $path -name]]
        if { [llength $desc] } {
            set text  [lindex $desc 0]
            set under [lindex $desc 1]
            Widget::configure $path [list -text $text]
            Widget::configure $path [list -underline $under]
................................................................................
        set text  ""
        Widget::configure $path [list -underline $under]
    }


    if { [BWidget::using ttk] } {
         $path configure -text $text -underline $under \
                         -textvariable $var -state $st

	 if { [$path cget -style] != "BWSlim.Toolbutton" } {
             $path configure -style "${relief}BW.TButton"
	 }
    } else {
         $path configure -relief $relief -text $text -underline $under \
	       -textvariable $var -state $st
    }

    bindtags $path [list $path BwButton [winfo toplevel $path] all]

................................................................................
                set relief "raised"
            } else {
                set relief "flat"
            }
        }

        if { [BWidget::using ttk] } {
            $path:cmd configure -state $state
            if { [string compare [$path:cmd cget -style] "BWSlim.Toolbutton"] != 0 } {
 	        $path:cmd configure -style "${relief}BW.TButton"
	    }
        } else {
            $path:cmd configure -relief $relief -state $state
        }
    }

    if { $cv || $cn || $ct || $cu } {
	set var		[Widget::cget $path -textvariable]