summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-12-17 21:09:46 (GMT)
committerjenglish <jenglish@flightlab.com>2006-12-17 21:09:46 (GMT)
commit7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9 (patch)
tree2e4308ec8e352756daff81632e81c195674ebdef /generic/ttk
parent916e70fb90cb972726e8e580ff8dabf5e3da7aa1 (diff)
downloadtk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.zip
tk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.tar.gz
tk-7f57cc3e07cec7711ebfbd96b9a28af4e9f463c9.tar.bz2
Add combobox -height option; only show scrollbar if the listbox
needs to scroll [#1032869].
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttkEntry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index c7a7a2f..157962e 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1,5 +1,5 @@
/*
- * $Id: ttkEntry.c,v 1.3 2006/12/14 19:51:04 jenglish Exp $
+ * $Id: ttkEntry.c,v 1.4 2006/12/17 21:09:46 jenglish Exp $
*
* DERIVED FROM: tk/generic/tkEntry.c r1.35.
*
@@ -156,6 +156,7 @@ typedef struct
#define DEF_INSERT_BG "black"
#define DEF_ENTRY_WIDTH "20"
#define DEF_ENTRY_FONT "TkTextFont"
+#define DEF_LIST_HEIGHT "10"
static Tk_OptionSpec EntryOptionSpecs[] =
{
@@ -1679,6 +1680,7 @@ static WidgetSpec EntryWidgetSpec =
typedef struct {
Tcl_Obj *postCommandObj;
Tcl_Obj *valuesObj;
+ Tcl_Obj *heightObj;
int currentIndex;
} ComboboxPart;
@@ -1690,6 +1692,9 @@ typedef struct {
static Tk_OptionSpec ComboboxOptionSpecs[] =
{
+ {TK_OPTION_STRING, "-height", "height", "Height",
+ DEF_LIST_HEIGHT, Tk_Offset(Combobox, combobox.heightObj), -1,
+ 0,0,0 },
{TK_OPTION_STRING, "-postcommand", "postCommand", "PostCommand",
"", Tk_Offset(Combobox, combobox.postCommandObj), -1,
0,0,0 },