3-D Checkboxes

We've seen 3-D buttons, frames, and panels, and it's time to turn our attention to 3-D checkboxes. We add 3-D checkboxes to our Web page this way:

<HTML>
    <HEAD>
    <TITLE>OCX Control Page</TITLE>
    </HEAD>
    <BODY LANGUAGE = VBScript ONLOAD = "Page_Initialize">
    <CENTER>
    <H1>OCX Control Page</H1>
    </CENTER>
        .
        .
        .
    <!- SSCheck>
    <PRE>
--> SSCheck:  <OBJECT CLASSID="clsid:0ba686aa-f7d3-101a-993e-0000c0ef6f5e"
                 HEIGHT=40 WIDTH=200 ID=SSCheck1></OBJECT>
                 </OBJECT>
    </PRE>
        .
        .
        .

You can see the new 3-D checkbox in Figure 6.2 (the "check" is really an x and not a check mark). When the user checks or unchecks the 3-D checkbox, its click event occurs, and we can set up a subroutine for that event. (This subroutine is passed true if the checkbox was checked and false otherwise.)

<SCRIPT LANGUAGE = VBScript>
            Sub Page_Initialize
                  Cmd1.Caption = "Hello"
                  Frame1.Caption = "Frame"
                  Panel1.Caption = "Panel"
                  Grid1.Rows = 3
                  Grid1.Cols = 3
                  Grid1.Row = 1
                  Grid1.Col = 1
                  Grid1.Text = "5"
                  Graph1.GraphData = 2
                  Graph1.GraphData = 4
                  Graph1.GraphData = 5
                  Graph1.GraphData = 3
            End Sub
-->         Sub SSCheck1_Click(OnOff)
                .
                .
                .
-->         End Sub
    </SCRIPT>
    </BODY>
    </HTML>

Another useful control is the AVI file control, and we'll explore that now.

© 1996 by Steven Holzner. All rights reserved.