summaryrefslogtreecommitdiffstats
path: root/lib/libforms/examples/example.frm
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1995-01-30 02:41:29 +0000
committerpaul <paul@FreeBSD.org>1995-01-30 02:41:29 +0000
commit98c415953eb41239c522e21c5aca1ba36b063de6 (patch)
tree8104cfa8a2d39c88da1d4853f45a7db056097f1d /lib/libforms/examples/example.frm
parentf5db704703c49558a7005edc04f345907a1aee24 (diff)
downloadFreeBSD-src-98c415953eb41239c522e21c5aca1ba36b063de6.zip
FreeBSD-src-98c415953eb41239c522e21c5aca1ba36b063de6.tar.gz
Add all the necessary bits to use color if the terminal allows it.
You can now specify separate attributes for selected/not selected cases individually for each field and also an attr for the form as a whole so you can now have colored backgrounds for the form and different coloured fields etc. Update the example. Change the copyright to a BSD style one.
Diffstat (limited to 'lib/libforms/examples/example.frm')
-rw-r--r--lib/libforms/examples/example.frm13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libforms/examples/example.frm b/lib/libforms/examples/example.frm
index 542d909..942bbbf 100644
--- a/lib/libforms/examples/example.frm
+++ b/lib/libforms/examples/example.frm
@@ -1,5 +1,10 @@
+Colors example {
+ pair = red, yellow
+ pair = blue, white
+}
+
Field Title {
- attributes = A_BOLD
+ attributes = COLOR_PAIR(2)
text = "A Simple Demo"
}
@@ -37,13 +42,13 @@ Field field7 {
Field field8 {
width = 6
- attributes = A_BOLD|A_REVERSE
action = "EXIT"
function = exit_form
}
Field field9 {
- attributes = A_BOLD|A_REVERSE
+ attributes = COLOR_PAIR(1)
+ highlight = COLOR_PAIR(1)|A_BOLD
action = "CANCEL"
function = cancel_form
}
@@ -80,6 +85,8 @@ Link cancel as field9 {
Form example at 0,0 {
height = 24
width = 80
+ colortable = example
+ attributes = COLOR_PAIR(1)
Field Title at 0,30
OpenPOWER on IntegriCloud