summaryrefslogtreecommitdiffstats
path: root/tests/button.test
diff options
context:
space:
mode:
authorericm <ericm>2000-05-10 00:09:38 (GMT)
committerericm <ericm>2000-05-10 00:09:38 (GMT)
commit7ff73db610e3d2efd82c272471c0dfe16d5745b8 (patch)
tree36475aa7b20157ca2cd0fba5339eb61b1484aead /tests/button.test
parent5766ce10779959eb0437e49fc4bdb3045982a63d (diff)
downloadtk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.zip
tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.gz
tk-7ff73db610e3d2efd82c272471c0dfe16d5745b8.tar.bz2
* doc/button.n: Added documentation for link relief.
* tests/button.test: Added tests for link relief for buttons. * generic/tk.h (TK_CONFIG_LINK_OK): Added definition of TK_RELIEF_LINK, TK_OPTION_LINK_OK and TK_CONFIG_LINK_OK. [RFE: 4348] * generic/tk3d.c: Added support for link relief. [RFE: 4348] * mac/tkMacButton.c (TkpDisplayButton): * unix/tkUnixButton.c (TkpDisplayButton): Added support for link relief. [RFE: 4348] * generic/tkOldConfig.c (Tk_ConfigureWidget): * generic/tkConfig.c (DoObjConfig): Added understanding of link relief, which is allowed only for widgets that have TK_OPTION_LINK_OK or TK_CONFIG_LINK_OK set for the "-relief" option. [RFE: 4348] * generic/tkButton.c: Added TK_OPTION_LINK_OK to "-relief" option for buttons. [RFE: 4348] * win/tkWinWm.c (EX_TRANSIENT_STYLE): Removed WS_EX_TOOLWINDOW style bit, so that transient windows have full-size titlebars (like the tk_getOpenFile dialog). * win/tkWinMenu.c (GetMenuSeparatorGeometry): Tweaked height requested for separator bars to be (linespace - (2*descent)) instead of just (linespace); this makes the separator occupy a more correct amount of vertical space. [Bug: 5303].
Diffstat (limited to 'tests/button.test')
-rw-r--r--tests/button.test19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/button.test b/tests/button.test
index 58932bb..145dddb 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: button.test,v 1.5 2000/03/08 03:19:31 ericm Exp $
+# RCS: @(#) $Id: button.test,v 1.6 2000/05/10 00:09:40 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -88,7 +88,6 @@ foreach test {
{-offvalue fantastic fantastic {} {} {0 0 1 0}}
{-padx 12m 12m 420x {bad screen distance "420x"} {1 1 1 1}}
{-pady 12m 12m 420x {bad screen distance "420x"} {1 1 1 1}}
- {-relief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} {1 1 1 1}}
{-selectcolor #110022 #110022 bogus {unknown color name "bogus"} {0 0 1 1}}
{-selectimage image1 image1 bogus {image "bogus" doesn't exist} {0 0 1 1}}
{-state normal normal bogus {bad state "bogus": must be active, disabled, or normal} {1 1 1 1}}
@@ -126,7 +125,21 @@ foreach test {
test button-1.$i {configuration options} {
.c configure -selectcolor {}
} {}
-incr i
+test button-1.[incr i] {configuration options} {
+ list [catch {.l configure -relief 1.5} msg] $msg
+} [list 1 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}]
+test button-1.[incr i] {configuration options} {
+ list [catch {.c configure -relief 1.5} msg] $msg
+} [list 1 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}]
+test button-1.[incr i] {configuration options} {
+ list [catch {.r configure -relief 1.5} msg] $msg
+} [list 1 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}]
+test button-1.[incr i] {configuration options} {
+ list [catch {.b configure -relief 1.5} msg] $msg
+} [list 1 {bad relief "1.5": must be flat, groove, link, raised, ridge, solid, or sunken}]
+test button-1.[incr i] {configuration options} {
+ list [catch {.b configure -relief link} msg] $msg [.b cget -relief]
+} [list 0 {} link]
test button-3.1 {ButtonCreate - not enough cd ../unix
} {