Xytroxon

Tuesday, June 01, 2004

Gui to explain Gui4Cli beta17c problems

Cut and paste the gui below the line
Copy to editor and save as "beta17c.gui"
--------
G4C beta17c
// Problems with Gui4Cli Beta 17c
// found while running on Win 98SE

WINDOW #center #center 295 260 "beta17c errors"
winattr background COLOR 255/0/255

xOnLoad
gosub #this filltree
GuiOpen #this

xOnClose
GuiQuit #this

//----------------- Problem 1
// Won't change background color.
// Really would like this one to work.
// Turning window background red is a nice
// way to flag that the gui needs attention.
// Like when an operator is standing across
// the room in a noisy enviroment,
xButton 5 5 140 25 "Set Background Color"
SetWinAttr background COLOR 0/255/0

//----------------- Problem 2
// Mostly I want to hide the color
// to the right of the tab buttons.
// Although a colored xTab would
// be nice if not too hard to program.
xButton 5 35 140 25 "Set xTab Color"
SetAttr #this tabs COLOR 255/255/255/0/0/0

xTab 5 65 140 100 "Tab1/Tab2" mytabs
attr ID tabs
attr COLOR 0/0/0/255/255/255

// I can do this little trick. But it doesn't
// help if you want to use a background image.
xTextBox 100 65 30 20 " hide "
attr COLOR 0/0/0/255/0/255

//----------------- "NO" Problem 3
// Works as advertised, no problems.
// included to show that SetAttr works.
xButton 5 170 140 25 "Set xTextBox Color"
SetAttr #this tb1 COLOR 255/255/255/0/0/0

xTextBox 5 200 140 55 "This is a Text Box"
attr ID tb1
attr COLOR 0/0/0/255/255/255

//----------------- Problem 4
// Can't change xTreeView background color.
xButton 150 5 140 25 "Set xTreeView Color"
SetAttr #this tv1 COLOR 255/255/255/0/0/0

xTreeView 150 35 140 90 "" mytv1
attr ID tv1
// Could the white color behind black text
// (at least it is on a Win 98 display)
// be set to the background color instead?
attr COLOR 0/255/0/0/255/255

//----------------- Problem 5
// Sets xEdBox color, but have to move slider
// to see color change. Also on win 98, after
// change, leaves part of old background
// color on bottom if text lines don't fit
// into xEdBox area exactly.
xButton 150 135 140 25 "Set xEdBox Color"
SetAttr #this eb1 COLOR 255/255/255/0/0/0

xEdBox 150 165 140 90 ":beta17c.gui"
attr ID eb1
attr COLOR 255/0/0/255/255/0

xRoutine filltree
use TV #this tv1
tv ADD "Root" ROOT
tv ADD "Top" CHILD
tv ADD "Middle"
tv ADD "Bottom"

//----------------- Problem 6 (scied)
// 1. scied ctrl X "cut text" also gives
// printer not found error msgbox.
// Maybe it's trying to print, didn't have printer on!
//
// 2. After F5 "save and run gui" returning to scied
// loses curent scied cursor positon.
// Also happens after alt tab switching between apps.
//
// 3. Gui4Cli output window
// *ERROR: No field: %SAVES
// *ERROR: No field: %PATH
// *ERROR: No field: %DATE
// Not sure if this is scied problem or my gui
// Maybe unzipping beta killed something?
// Seems to happen while editing text with scied
//
// 4. Putting a // comment above xButton, WINDOW etc.
// without a blank line in between causes text color
// highlighting to revert to black text