Bwidget Source Code
Check-in [c8c94e175f]
Not logged in

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

Overview
Comment:spinbox.tcl: fix error about unsupported option -disabledforeground when using themed widgets. [071fc80f14]
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA3-256: c8c94e175f4320e46638895aa1136f66d75cf623d048c2eb98c1b18cfa955d87
User & Date: oehhar 2019-11-12 08:06:36.868
References
2019-11-12
08:08 Ticket [071fc80f14] SpinBox fails if tile is active status still Open with 4 other changes artifact: 936a8b11d5 user: oehhar
Context
2019-12-03
20:24
Release 1.9.14 check-in: 4c4c211ea0 user: oehhar tags: bwidget, bwidget-1.9.14
2019-11-12
08:06
spinbox.tcl: fix error about unsupported option -disabledforeground when using themed widgets. [071fc80f14] check-in: c8c94e175f user: oehhar tags: bwidget
2019-05-07
11:34
mainframe.tcl: Allow to skip a main menu level by empty menu label. Purpose: support commands/checkboxes at first level. check-in: 96249ade71 user: oehhar tags: bwidget
Changes
Unified Diff Ignore Whitespace Patch
Changes to BWman/SpinBox.html.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>







|
















|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<DD><A HREF="#descr"><B>SpinBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
</DL>
<DL>
<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-background or -bg</TD>
<TD>&nbsp;&nbsp;-disabledforeground (not themed)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-foreground or -fg</TD>
<TD>&nbsp;&nbsp;-repeatdelay</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-repeatinterval</TD>
<TD>&nbsp;&nbsp;-state</TD>
</TR>
</TABLE></DD>
</DL>
<DL>
<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>&nbsp;&nbsp;-command</TD>
<TD>&nbsp;&nbsp;-disabledforeground (not themed)</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragenabled</TD>
<TD>&nbsp;&nbsp;-dragendcmd</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;-dragevent</TD>
Changes to ChangeLog.






1
2
3
4
5
6
7






2019-05-06 Harald Oehlmann <[email protected]>
	mainframe.tcl: Add optional parameter "Top" to internal
	function "MainFrame::_create_menubar" to allow to use
	a menu button for the main menu (Hack).
	The mainframe may be initialized with "- menu {}".
	Then, the menubutton may be created and the menu may
	by added by:
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2019-11-12 Harald Oehlmann <[email protected]>
	spinbox.tcl: fix error about unsupported option
	-disabledforeground when using themed widgets.
	Thanks to Gerhard Reithofer and Christian Werner.
	Ticket [071fc80f14]

2019-05-06 Harald Oehlmann <[email protected]>
	mainframe.tcl: Add optional parameter "Top" to internal
	function "MainFrame::_create_menubar" to allow to use
	a menu button for the main menu (Hack).
	The mainframe may be initialized with "- menu {}".
	Then, the menubutton may be created and the menu may
	by added by:
Changes to spinbox.tcl.
35
36
37
38
39
40
41

42









43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67



68

69
70
71
72
73
74
75
        {-modifycmd      String ""  0}
        {-repeatdelay    Int    400 0 {%d >= 0}}
        {-repeatinterval Int    100 0 {%d >= 0}}
	{-foreground     TkResource black 0 {button}}
    }

    Widget::addmap SpinBox "" :cmd {-background {}}

    Widget::addmap SpinBox ArrowButton .arrup {









        -foreground {} -background {} -disabledforeground {} -state {} \
		-repeatinterval {} -repeatdelay {}
    }
    Widget::addmap SpinBox ArrowButton .arrdn {
        -foreground {} -background {} -disabledforeground {} -state {} \
		-repeatinterval {} -repeatdelay {}

    }

    ::bind SpinBox <FocusIn> [list after idle {BWidget::refocus %W %W.e}]
    ::bind SpinBox <Destroy> [list SpinBox::_destroy %W]

    variable _widget
}


# -----------------------------------------------------------------------------
#  Command SpinBox::create
# -----------------------------------------------------------------------------
proc SpinBox::create { path args } {
    array set maps [list SpinBox {} :cmd {} .e {} .arrup {} .arrdn {}]
    array set maps [Widget::parseArgs SpinBox $args]
    eval [list frame $path] $maps(:cmd) \
	[list -highlightthickness 0 -takefocus 0 -class SpinBox]
    Widget::initFromODB SpinBox $path $maps(SpinBox)




    set entry [eval [list Entry::create $path.e] $maps(.e) -relief flat -bd 0]

    bindtags $path.e [linsert [bindtags $path.e] 1 SpinBoxEntry]

    set farr   [frame $path.farr -relief flat -bd 0 -highlightthickness 0]
    set height [expr {[winfo reqheight $path.e]/2-2}]
    set width  11
    set arrup  [eval [list ArrowButton::create $path.arrup -dir top] \
	    $maps(.arrup) \







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



















>
>
>
|
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        {-modifycmd      String ""  0}
        {-repeatdelay    Int    400 0 {%d >= 0}}
        {-repeatinterval Int    100 0 {%d >= 0}}
	{-foreground     TkResource black 0 {button}}
    }

    Widget::addmap SpinBox "" :cmd {-background {}}
    if {$::Widget::_theme} {
        Widget::addmap SpinBox ArrowButton .arrup {
                -foreground {} -background {} -state {} \
                -repeatinterval {} -repeatdelay {}
        }
        Widget::addmap SpinBox ArrowButton .arrdn {
                -foreground {} -background {} -state {} \
                -repeatinterval {} -repeatdelay {}
        }
    } else {
        Widget::addmap SpinBox ArrowButton .arrup {
                -foreground {} -background {} -disabledforeground {} -state {} \
                -repeatinterval {} -repeatdelay {}
        }
        Widget::addmap SpinBox ArrowButton .arrdn {
                -foreground {} -background {} -disabledforeground {} -state {} \
                -repeatinterval {} -repeatdelay {}
        }
    }

    ::bind SpinBox <FocusIn> [list after idle {BWidget::refocus %W %W.e}]
    ::bind SpinBox <Destroy> [list SpinBox::_destroy %W]

    variable _widget
}


# -----------------------------------------------------------------------------
#  Command SpinBox::create
# -----------------------------------------------------------------------------
proc SpinBox::create { path args } {
    array set maps [list SpinBox {} :cmd {} .e {} .arrup {} .arrdn {}]
    array set maps [Widget::parseArgs SpinBox $args]
    eval [list frame $path] $maps(:cmd) \
	[list -highlightthickness 0 -takefocus 0 -class SpinBox]
    Widget::initFromODB SpinBox $path $maps(SpinBox)

    if {$Widget::_theme} {
        set entry [eval [list Entry::create $path.e] $maps(.e)]
    } else {
        set entry [eval [list Entry::create $path.e] $maps(.e) -relief flat -bd 0]
    }
    bindtags $path.e [linsert [bindtags $path.e] 1 SpinBoxEntry]

    set farr   [frame $path.farr -relief flat -bd 0 -highlightthickness 0]
    set height [expr {[winfo reqheight $path.e]/2-2}]
    set width  11
    set arrup  [eval [list ArrowButton::create $path.arrup -dir top] \
	    $maps(.arrup) \