Hi,
I want the background of my dialogs in another color. I thought that would be easy with XBPSYSCLR_DIALOGBACKGROUND in a presentation array. However, it seems as this isn't working.
Is there a way to change the background of my application with one change?
dialog background
Re: dialog background
Hi, Chris.
This will set all options you don't set when creating the dialogs. Any option set there will overwrite the standard options. If the user changes preferences, just call "SetDefOptions()" again.
Code: Select all
FUNCTION SetDefOptions() // sets basic GetOptions for the app
LOCAL GetOptions := {}
DCGET OPTIONS .... COLOR naMyDialogColor
DC_GetOptDefault(GetOptions)
RETURN NIL
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: dialog background
Tom,
I don't understand why this isn't working. This is what I do.
My background remains the standard gray, which looks rather old fashioned.
I don't understand why this isn't working. This is what I do.
Code: Select all
DCGETOPTIONS ;
WINDOWHEIGHT nWindowHeight ;
WINDOWWIDTH nWindowWidth ;
NOBUSY ;
COLOR { 100,150,200 } ;
FITPAD 25 ;
SAYFONT cSayFont ;
GETFONT cGetFont ;
FONT cSayFont ;
COLPIXELS nColPixels ;
ROWPIXELS nRowPixels ;
ROWSPACE nRowPixels ;
TOOLTIPCOLOR GRA_CLR_BLACK, GRA_CLR_YELLOW ;
ABORTQUERY MSG {||DC_MsgBox(,,{'Stoppen ? / Arreter ?'},"Logiciel ABO Software" ,,,.t.,1,,,,,'10.Arial.bold')} ;
CLOSEQUERY MSG {||DC_MsgBox(,,{'Stoppen ? / Arreter ?'},"Logiciel ABO Software",,,.t.,1,,,,,'10.Arial.bold')} ;
COLORGETS { { GRA_CLR_BLACK , GraMakeRGBColor({255,255,190}) } }
DC_GetOptDefault(GetOptions)
DCREAD GUI ;
TITLE '...' ;
OPTIONS GetOptions ;
PARENT @oDlg ;
....
Re: dialog background
Hi, Chris.
This should work. It does in my app. But I use it this way:
This should work. It does in my app. But I use it this way:
Code: Select all
COLOR GraMakeRGBColor({ 100,150,200 })
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: dialog background
Tom,
Yes, it should work, it also works in my samples and tests. It didn't in my application.
I just found the cause of it. However it doesn't seem logical to me.
In my main function, I had dcgetoptions twice. This was what I had:
In the start of my code
dcgetoptions ..... without the COLOR clause
DC_GetOptDefault(GetOptions) // set this as default in my application
Before the dcread gui
dcgetoptions ..... with the COLOR clause
DC_GetOptDefault(GetOptions) // set this as default from now on
dcread gui options getoptions ....
The dcread is using the first getoptions, without the color clause.
Anyway, problem solved. Now adding the possibility for a user to select his own background color.
Yes, it should work, it also works in my samples and tests. It didn't in my application.
I just found the cause of it. However it doesn't seem logical to me.
In my main function, I had dcgetoptions twice. This was what I had:
In the start of my code
dcgetoptions ..... without the COLOR clause
DC_GetOptDefault(GetOptions) // set this as default in my application
Before the dcread gui
dcgetoptions ..... with the COLOR clause
DC_GetOptDefault(GetOptions) // set this as default from now on
dcread gui options getoptions ....
The dcread is using the first getoptions, without the color clause.

Anyway, problem solved. Now adding the possibility for a user to select his own background color.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: dialog background
I thing you need to do it slightly differently if you want to do 2 sets of options.
Code: Select all
DC_GetOptDefault(GetOptions)
DCADDGETOPTION BITMAP 'FEATHERTEXTURE.BMP' HIDE
Re: dialog background
Hi Cliff,
I don't want two sets active at the same time. I supposed that the second would overwrite the first one.
The second has the color clause, the first one not. I would expect it is added.
Anyway, my problem is solved.
I don't want two sets active at the same time. I supposed that the second would overwrite the first one.
The second has the color clause, the first one not. I would expect it is added.
Anyway, my problem is solved.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: dialog background
My understanding is that it adds to an existing Setup only, not overriding the defaults.
Cliff
Cliff