home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
gkdemo.zip
/
GKFILES.SET
/
EMPLAPPL.GKR
< prev
next >
Wrap
Text File
|
1994-12-08
|
6KB
|
270 lines
#
# Employee Maintenance Example
#
!include "gui-kit.gkr"
ObjectGroup "EmplGroup" {
# ----------------------------------------
# This font is used on the title
#
Object Font "Helv-Italic" {
Name "Arial-Italic"
PointSize 200
}
# ----------------------------------------
# Create bitmap/text button labels
#
Object GfxContainer "oklabel" {
Layout LeftToRight|CenterVertical
Object GfxImage "okcheck" {
ImageFile "okcheck.xpm"
TransparentColor "White"
}
Object GfxText - { String "OK" }
}
Object GfxContainer "cancellabel" {
Layout LeftToRight|CenterVertical
Object GfxImage "cancelx" {
ImageFile "cancelx.xpm"
TransparentColor "White"
}
Object GfxText - { String "Cancel" }
}
Object GfxContainer "helplabel" {
Layout LeftToRight|CenterVertical
Object GfxImage "help" {
ImageFile "help.xpm"
TransparentColor "White"
}
Object GfxText - { String "Help" }
}
Object GfxContainer "searchlabel" {
Layout LeftToRight|CenterVertical
Object GfxImage "search" {
ImageFile "search.xpm"
TransparentColor "Cyan"
}
Object GfxText - { String "Search" }
}
# ----------------------------------------
# This is the employee's picture to be displayed in the ViewPort
#
Object GfxImage "EmplPicture" {
ImageFile "einstien.bmp"
}
# ----------------------------------------
# This is the large window title
#
Object GfxText "Title" {
String "{Font:Helv-Italic}{Color:Red}Employee Information"
Center True
Geometry "0,0, 19cm, 0"
}
# ----------------------------------------
# EmplFrame is the main window frame
#
Object DialogFrame "EmplFrame" {
Frame.Title "Employee Information"
Window.HelpFile "emplappl.hlp"
# ----------------------------------------
# Create a form to layout the controls
#
Object FormWithEtchedFrame - {
Form.AutoTopToBottom -
Object Label "TitleLabel" { GfxObj "Title" }
# ----------------------------------------
# Create a nested form for the data entry information
#
Object FormWithEtchedFrame "AddrForm" {
Form.AutoLeftToRight -
Object Label "NameLabel" {
Text "Name:"
Window.Width 2.75cm
}
Object Edit "NameEdit" { }
Object Label "AddrLabel" {
Window.LeftObj NULL
Window.UpperObj "NameEdit"
Text "Address:"
Window.Width 2.75cm
}
Object Edit "AddrEdit" {
VisibleChars 20
VisibleLines 3
HorzScroll True
VertScroll True
}
Object Label "CityLabel" {
Window.LeftObj NULL
Window.UpperObj "AddrEdit"
Text "City, ST, Zip:"
Window.Width 2.75cm
}
Object Edit "CityEdit" { VisibleChars 12 }
Object Edit "StateEdit" {
VisibleChars 2
MaxEnterableChars 2
CnvUpperCase True
}
Object Edit "ZipEdit" { VisibleChars 10 }
Object Label "PhoneLabel" {
Window.LeftObj NULL
Window.UpperObj "CityEdit"
Text "Phone:"
Window.Width 2.75cm
}
Object Edit "PhoneEdit" { VisibleChars 12 }
Object Label "SSNLabel" {
Window.LeftObj NULL
Window.UpperObj "PhoneEdit"
Text "SSN:"
Window.Width 2.75cm
}
Object Edit "SSNEdit" { VisibleChars 11 }
Object Label "HireDateLabel" {
Window.LeftObj NULL
Window.UpperObj "SSNEdit"
Text "Hire Date:"
Window.Width 2.75cm
}
Object Edit "HireDateEdit" { VisibleChars 8 }
Object Label "LastRevLabel" {
Text "Last Review Date:"
}
Object Edit "LastRevEdit" { VisibleChars 8 }
Object Label "StatusLabel" {
Window.LeftObj NULL
Window.UpperObj "HireDateEdit"
Text "Status:"
Window.Width 2.75cm
}
Object RadioButton "Status-Active" {
Button.Label "Active"
Button.ExclGroup 1
}
Object RadioButton "Status-Term" {
Button.Label "Terminated"
Button.ExclGroup 1
}
Object RadioButton "Status-Leave" {
Button.Label "On Leave"
Button.ExclGroup 1
}
Object Label "SexLabel" {
Window.LeftObj NULL
Window.UpperObj "StatusLabel"
Text "Sex:"
Window.Width 2.75cm
}
Object RadioButton "Sex-Male" {
Button.Label "Male"
Button.ExclGroup 2
}
Object RadioButton "Sex-Female" {
Button.Label "Female"
Button.ExclGroup 2
}
Object Label "ExemptionsLabel" {
Window.LeftObj NULL
Window.UpperObj "SexLabel"
Text "Exemptions:"
Window.Width 2.75cm
}
Object CheckButton "Exemptions-FICA" {
Button.Label "FICA"
}
Object CheckButton "Exemptions-MediCare" {
Button.Label "MediCare"
}
Object CheckButton "Exemptions-FUTA" {
Button.Label "FUTA"
}
Object CheckButton "Exemptions-SUTA" {
Button.Label "SUTA"
}
} # End Addr Form
# ----------------------------------------
# This is the ViewPort containing the employee's picture
#
Object ViewPort "EmplViewPort" {
Window.Width 5cm
Window.Height 5.5cm
Window.LeftObj "AddrForm"
Window.UpperObj "TitleLabel"
Object Window "EmplVPWindow" {
BackgroundGfxObj "EmplPicture"
Window.Width 5cm
Window.Height 5cm
}
}
# ----------------------------------------
# The OK, Cancel, Search, and Help buttons
#
Object PushButton "OkButton" {
Button.LabelGfxObj "oklabel"
Button.Default True
Button.NotifyProc "OKButtonNotify"
Window.Width 3cm
}
Object PushButton - {
Button.LabelGfxObj "cancellabel"
Button.KeyAccelerator "Key(Escape)"
Button.NotifyProc "CancelButtonNotify"
Window.Width 3cm
}
Object PushButton - {
Button.LabelGfxObj "searchlabel"
Button.NotifyProc "SearchButtonNotify"
Window.UpperObj "EmplViewPort"
Window.LeftObj "OkButton"
Window.Width 3cm
}
Object PushButton - {
Button.LabelGfxObj "helplabel"
Button.NotifyProc "HelpButtonNotify"
Window.Width 3cm
}
} # End Top Form
} # End Frame
}