OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [tests/] [general/] [select.tcl] - Blame information for rev 1782

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
proc About {} {
2
    return "Testing the TixSelect widget"
3
}
4
 
5
proc Test {} {
6
    set dis  [tix option get disabled_fg]
7
    set norm [tix option get fg]
8
 
9
    # Create with a normal state
10
    #
11
    #
12
    tixSelect .foo -allowzero 0 -radio 1 -label "Foo:" \
13
        -state normal
14
    .foo add "1" -text "One"
15
    .foo add "2" -text "Two"
16
    pack .foo
17
 
18
    Assert {[.foo subwidget label cget -foreground] == $norm}
19
    .foo config -state normal
20
    .foo config -state normal
21
    Assert {[.foo subwidget label cget -foreground] == $norm}
22
    .foo config -state disabled
23
    Assert {[.foo subwidget label cget -foreground] == $dis}
24
    .foo config -state normal
25
    Assert {[.foo subwidget label cget -foreground] == $norm}
26
 
27
    update
28
    destroy .foo
29
 
30
    tixSelect .foo -allowzero 0 -radio 1 -label "Foo:" \
31
        -state disabled
32
    .foo add "1" -text "One"
33
    .foo add "2" -text "Two"
34
    pack .foo
35
 
36
    Assert {[.foo subwidget label cget -foreground] == $dis}
37
    .foo config -state normal
38
    Assert {[.foo subwidget label cget -foreground] == $norm}
39
    .foo config -state normal
40
    Assert {[.foo subwidget label cget -foreground] == $norm}
41
    .foo config -state disabled
42
    Assert {[.foo subwidget label cget -foreground] == $dis}
43
    .foo config -state normal
44
    Assert {[.foo subwidget label cget -foreground] == $norm}
45
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.