Grids

General development discussion.

Moderators: Susan Smith, admin, Gabriel

BLarry1T
Posts: 22
Joined: Thu Jul 14, 2011 9:14 am

Post by BLarry1T »

The problem I am having is that the background color doesn't change when I use the HTML scheme.

But I will try to work it out in BRCONFIG.SYS.

I need to find the syntax for doing that.


Sorry, but it's like I;ve been out of school for a while and can't find all my reference material. I know it is all out there somewhere!

Thanks for all the help!
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

Set up color definitions in your brconfig.sys file. Or set them up in a seperate file that gets INCLUDEd into your brconfig.sys file. (http://brwiki.ads.net/index.php?title=Include).

I like to use a file called color.sys. This file defines my colors. I then include it into my brconfig.sys file.

You set up color substitutions using the CONFIG COLOR statement. (http://brwiki.ads.net/index.php?title=Color) Here's my color.sys file:
COLOR [LTGREY] #CCCCCC
COLOR [LTBLUE] #AFCFFF
COLOR [LTYELLOW] #FFFF77
COLOR [LTRED] #FF5050
COLOR [PURPLE] #FF77FF
COLOR [GREEN] #00FF00
COLOR [LTGREEN] #50FF50
COLOR [RED] #FF0000
COLOR [BLUE] #83AEF7
COLOR [YELLOW] #FFFF00
COLOR [SYELLOW] #FFFFAF
COLOR [MYELLOW] #FFFF50
COLOR [MAGENTA] #FF00FF
COLOR [CYAN] #00FFFF
COLOR [BLACK] #000000
COLOR [WHITE] #FFFFFF
COLOR [BABYBLUE] #0066FF
COLOR [DKRED] #A00000
COLOR [DKYELLOW] #3F3F00
COLOR [DKGREEN] #007700
COLOR [BLUEGREEN] #00FFAF
COLOR [ANOTBLUE] #3333FF
COLOR [ORANGE] #FF8000
COLOR [DKGREY] #777777
COLOR [MEDRED] #C00000
COLOR [BRIGHTGREY] #EEEEEE
COLOR [DKBLUE] #003377
COLOR [BLKGREY] #202020
COLOR [GREY] #A0A0A0
COLOR [DKPURPLE] #7F007F
COLOR [DKDKRED] #5F0000
COLOR [BROWN] #5F3000
Feel free to use these color definitions in your own color.sys file. Just copy and paste them into it.

After the color definitions are included into my brconfig.sys file, I'm ready to define the theme. This is the theme that's going to be used to color my programs. I do it in another file. This one is called thmeblue.sys, indicating that its a color theme describing a blue coloring scheme. But I could make other themes easily, and then allow each user to have their own color scheme, by conditionally including them in my brconfig.sys file based on username.

Here's an excerpt from my thmeblue.sys file:

Code: Select all

ATTRIBUTE [BUTTONS] /[BLACK]:[LTGREY]
ATTRIBUTE [LVHEADERS] /[BLACK]:[LTGREY]
ATTRIBUTE [HILITE] /[YELLOW]:[BLUE]
ATTRIBUTE [BOLD] /[YELLOW]:[BLUE]
ATTRIBUTE [INPUT] S/[BLACK]:[LTBLUE]
ATTRIBUTE [ACTIVEINPUT] /[BLACK]:[LTYELLOW]
ATTRIBUTE [BACKGROUND] /[BLACK]:[BLUE]
ATTRIBUTE [BACKGROUND2] /[WHITE]:[BABYBLUE]
ATTRIBUTE [ERROR] /[RED]:[LTBLUE]
ATTRIBUTE [INVISIBLE] /[BLUE]:[BLUE]
ATTRIBUTE [PROTECTED] /[BLACK]:[LTGREY]
ATTRIBUTE [LIGHTBG] /[BLACK]:[LTBLUE]
ATTRIBUTE [DATEWINDOW] /[WHITE]:[ANOTBLUE]
This file uses the CONFIG ATTRIBUTE command (http://brwiki.ads.net/index.php?title=A ... 8config%29) to set up attribute statements defining the color scheme to be used by different visual parts of my program. I can use the color specifications I made in color.sys here (as long as color.sys is included BEFORE thmeblue.sys).

So the first attribute defines that in the Blue theme (thmeblue.sys), buttons should be colored with black text on a light grey background.The second attribute defines the color for listview headers, etc.

Finally, in my programs, I define the color for all Listview Headers to be [LVHEADERS], causing BR to look in my color theme definition, and apply the Black on Light Grey colors to the listview header.


Colors (and fonts) were set up this way in modern BR to make it easy to configure multiple themes for your programs that are not dependent upon your actual source code. Using this system, I could have two users, one who sees my software in a Blue theme and one that sees my software in a Green theme. All I have to do is create the Green theme, and conditionally include it in my brconfig.sys file. (http://brwiki.ads.net/index.php?title=W ... login_name)

The code I would put in my brconfig.sys file is the following snippet:

Code: Select all

INCLUDE color.sys
@ssmith INCLUDE thmeblue.sys
@gtisdale INCLUDE thmegreen.sys
Hope this clarifies things a bit.. :) Its frustrating when you can't find proper documentation on anything.

If you're feeling particularly gregarious, feel free to modify the documentation to make it easier to find, and easier to understand. Thats what a wiki is all about.
BLarry1T
Posts: 22
Joined: Thu Jul 14, 2011 9:14 am

Post by BLarry1T »

For clarification:

If I use the following lines of code:

100 Execute "CONFIG COLOR [BBLUE] #COLOR
101 Execute "CONFIG COLOR [BRED] #COLOR


i should be able to use the following snippet in a line of code

110 ......... H/BBLUE:BRED

I am asking, because it didn't work. I would think there is another step involved in this process.

110 ..... H/#COLOR:#COLOR works fine
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

110 ......... H/[BBLUE]:[BRED]

You need the square brackets to tell BR to execute a substitution.
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

Try using this code instead:

Code: Select all

100 Execute "CONFIG COLOR [BBLUE] #00FF00
101 Execute "CONFIG COLOR [BRED] #FF0000
102 Execute "CONFIG ATTRIBUTE [BLUEONRED] /[BBLUE]:[BRED]"
and then use [BLUEONRED] in your code.

Gabriel

Posted: Thu Aug 18, 2011 3:40 pm Post subject:
For clarification:

If I use the following lines of code:

100 Execute "CONFIG COLOR [BBLUE] #COLOR
101 Execute "CONFIG COLOR [BRED] #COLOR


i should be able to use the following snippet in a line of code

110 ......... H/BBLUE:BRED
[/quote]
BLarry1T
Posts: 22
Joined: Thu Jul 14, 2011 9:14 am

Post by BLarry1T »

Thanks all.

Going back to school has been great.

My client is happy too !!
BLarry1T
Posts: 22
Joined: Thu Jul 14, 2011 9:14 am

execute system error

Post by BLarry1T »

Previosuly i found that

Execute 'system -m -c "Start acrobat c:\filename"'

would work fine.

If I try

Execute 'system -m -c " Start acrodboat c:\"&flname$'

i get a file not found error. What is the proper syntax for using a variable, rather than the atual filename?
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Post by Gabriel »

Try:

Code: Select all

Execute 'system -m -c " Start acrobat c:\"'&flname$
Post Reply