Bwidget Source Code
Check-in [7900eac005]
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:Added support for native look and feel to the paned window for Windows platform.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7900eac005b0be2adc1c81c06a6ddc86bfc053e0
User & Date: ericm 1999-08-19 20:37:00
Context
1999-08-20
01:42
Added redo.gif, the mirror image of undo.gif. check-in: 3b71e26a66 user: ericm tags: trunk
1999-08-19
20:37
Added support for native look and feel to the paned window for Windows platform. check-in: 7900eac005 user: ericm tags: trunk
1999-08-03
20:20
BWidget 1.2.1 import check-in: d1cd036e1f user: ericm tags: trunk, bwidget-1-2-1
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to panedw.tcl.

103
104
105
106
107
108
109
110
111

112
113
114










115

116

117
118
119
120

121

122
123
124
125
126

127
128
129
130

131

132
133
134
135

136
137
138

139
140
141
142
143
144
145
    set bg [Widget::getoption $path -background]

    set wbut  [Widget::getoption $path -width]
    set pad   [Widget::getoption $path -pad]
    set width [expr {$wbut+2*$pad}]
    set side  [Widget::getoption $path -side]
    if { $num > 0 } {
        set frame [frame $path.sash$num -relief flat -bd 0 -highlightthickness 0 \
                       -width $width -height $width -bg $bg]

        set sep   [frame $frame.sep -bd 1 -relief raised -highlightthickness 0 -bg $bg]
        set but   [frame $frame.but -bd 1 -relief raised -highlightthickness 0 -bg $bg \
                       -width $wbut -height $wbut]










        if { ![string compare $side "top"] || ![string compare $side "bottom"] } {

            place $sep -relx 0.5 -y 0 -width 2 -relheight 1.0 -anchor n

            if { ![string compare $side "top"] } {
                place $but -relx 0.5 -y [expr {6+$wbut/2}] -anchor c
            } else {
                place $but -relx 0.5 -rely 1.0 -y [expr {-6-$wbut/2}] -anchor c

            }

            $but configure -cursor sb_h_double_arrow 
            grid $frame -column [expr 2*$num-1] -row 0 -sticky ns
            grid columnconfigure $path [expr 2*$num-1] -weight 0
        } else {
            place $sep -x 0 -rely 0.5 -height 2 -relwidth 1.0 -anchor w

            if { ![string compare $side "left"] } {
                place $but -rely 0.5 -x [expr {6+$wbut/2}] -anchor c
            } else {
                place $but -rely 0.5 -relx 1.0 -x [expr {-6-$wbut/2}] -anchor c

            }

            $but configure -cursor sb_v_double_arrow 
            grid $frame -row [expr 2*$num-1] -column 0 -sticky ew
            grid rowconfigure $path [expr 2*$num-1] -weight 0
        }

        bind $but <ButtonPress-1> "PanedWindow::_beg_move_sash $path $num %X %Y"
    } else {
        if { ![string compare $side "top"] || ![string compare $side "bottom"] } {

            grid rowconfigure $path 0 -weight 1
        } else {
            grid columnconfigure $path 0 -weight 1
        }
    }

    set pane [frame $path.f$num -bd 0 -relief flat -highlightthickness 0 -bg $bg]






|
|
>
|
|
|
>
>
>
>
>
>
>
>
>
>
|
>
|
>
|
|
|
|
>
|
>
|



|
>
|
|
|
|
>
|
>
|



>
|

|
>







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
    set bg [Widget::getoption $path -background]

    set wbut  [Widget::getoption $path -width]
    set pad   [Widget::getoption $path -pad]
    set width [expr {$wbut+2*$pad}]
    set side  [Widget::getoption $path -side]
    if { $num > 0 } {
        set frame [frame $path.sash$num -relief flat -bd 0 \
		-highlightthickness 0 -width $width -height $width -bg $bg]
        set sep   [frame $frame.sep -bd 5 -relief raised \
		-highlightthickness 0 -bg $bg]
        set but   [frame $frame.but -bd 1 -relief raised \
		-highlightthickness 0 -bg $bg -width $wbut -height $wbut]
	set placeButton 1
	set sepsize     2
	if { $::tcl_platform(platform) != "windows" } {
	    set activator $but
	} else {
	    set activator $sep
	    set sepsize 4
	    $sep configure -bd 3
	    set placeButton 0
	}
        if { ![string compare $side "top"] || \
		![string compare $side "bottom"] } {
            place $sep -relx 0.5 -y 0 -width $sepsize -relheight 1.0 -anchor n
	    if { $placeButton } {
		if { ![string compare $side "top"] } {
		    place $but -relx 0.5 -y [expr {6+$wbut/2}] -anchor c
		} else {
		    place $but -relx 0.5 -rely 1.0 -y [expr {-6-$wbut/2}] \
			    -anchor c
		}
	    }
            $activator configure -cursor sb_h_double_arrow 
            grid $frame -column [expr 2*$num-1] -row 0 -sticky ns
            grid columnconfigure $path [expr 2*$num-1] -weight 0
        } else {
            place $sep -x 0 -rely 0.5 -height $sepsize -relwidth 1.0 -anchor w
	    if { $placeButton } {
		if { ![string compare $side "left"] } {
		    place $but -rely 0.5 -x [expr {6+$wbut/2}] -anchor c
		} else {
		    place $but -rely 0.5 -relx 1.0 -x [expr {-6-$wbut/2}] \
			    -anchor c
		}
	    }
            $activator configure -cursor sb_v_double_arrow 
            grid $frame -row [expr 2*$num-1] -column 0 -sticky ew
            grid rowconfigure $path [expr 2*$num-1] -weight 0
        }
        bind $activator <ButtonPress-1> \
		"PanedWindow::_beg_move_sash $path $num %X %Y"
    } else {
        if { ![string compare $side "top"] || \
		![string compare $side "bottom"] } {
            grid rowconfigure $path 0 -weight 1
        } else {
            grid columnconfigure $path 0 -weight 1
        }
    }

    set pane [frame $path.f$num -bd 0 -relief flat -highlightthickness 0 -bg $bg]