Hi --
(IMPORTANT)
this change:
1084. DCTABPAGE .. COLOR now supports a code block for the foreground and
background colors.
causes extreme trouble in our tabpage coloring!
The xBase methods for setting the color do not work anymore -
And: (from our point of view...) it always DID support codeblocks..
Our code was:
@ 00,00 DCTABPAGE o4TabPage ;
CAPTION "ShF8 - Numbers" ;
PARENT oDlg ;
COLOR {||if(M->USER == "PCH", {GRA_CLR_BLACK, GRA_CLR_BACKGROUND}, {GRA_CLR_BLACK, GraMakeRGBColor({205,205,175})}) }
And we set Tabpage color depending on some vars in the code by:
// Changing Tabpage colors
IF nZNR_Status = 0
o4TabPage:SetColorBG(GRA_CLR_YELLOW)
ELSEIF nZNR_Status = 1
o4TabPage:SetColorBG(GRA_CLR_GREEN)
ELSEIF nZNR_Status = 2
o4TabPage:SetColorBG(GRA_CLR_RED)
ENDIF
This code does not affect the tabpages colors anymore..
Any help or workaround urgently needed!!
- Michael
Tabpage Color under 254
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Tabpage Color under 254
S T O P
this must have another reason...
I'm working on a test program..
Sorry
- Michael
this must have another reason...
I'm working on a test program..
Sorry
- Michael
Re: Tabpage Color under 254
Hi, Michael.
The color with tabpages does not work with SL1 anymore if tabpages use visual styles (default). If Roger finds a color clause inside DCTABPAGE, he switches visual style off for this tabpage. This is what you should do - or add a "dummy" color clause to DCTABPAGE.
Tom
The color with tabpages does not work with SL1 anymore if tabpages use visual styles (default). If Roger finds a color clause inside DCTABPAGE, he switches visual style off for this tabpage. This is what you should do - or add a "dummy" color clause to DCTABPAGE.
Tom
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."
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Tabpage Color under 254
Don't think so:
it must have todo with the change number 1084..
Before (Version 252) : If I set the color with :SetColorBG it 'keeps' the change..
Now: If I now set it with :setcolorBG, it changes back to the original color in the codeblock every time the
getlist is refreshed!!
Try this:
#INCLUDE "dcdialog.CH"
procedure appsys
return
procedure main
Local Getlist := {}
@ 00,00 DCTABPAGE o4TabPage ;
SIZE 100,20 ;
CAPTION "ShF8 - Z-Nummern" ;
COLOR {||{GRA_CLR_BLACK, GraMakeRGBColor({205,205,175})} }
@ 10,10 DCPUSHBUTTON CAPTION "Change Color" SIZE 12,1.2 ACTION {||o4TabPage:SetColorBG(GRA_CLR_RED), sleep(50), DC_GetRefresh(Getlist)} PARENT o4TabPage
DCREAD GUI FIT TITLE "TabTest" ADDBUTTONS to lOK
return
- MIchael
it must have todo with the change number 1084..
Before (Version 252) : If I set the color with :SetColorBG it 'keeps' the change..
Now: If I now set it with :setcolorBG, it changes back to the original color in the codeblock every time the
getlist is refreshed!!
Try this:
#INCLUDE "dcdialog.CH"
procedure appsys
return
procedure main
Local Getlist := {}
@ 00,00 DCTABPAGE o4TabPage ;
SIZE 100,20 ;
CAPTION "ShF8 - Z-Nummern" ;
COLOR {||{GRA_CLR_BLACK, GraMakeRGBColor({205,205,175})} }
@ 10,10 DCPUSHBUTTON CAPTION "Change Color" SIZE 12,1.2 ACTION {||o4TabPage:SetColorBG(GRA_CLR_RED), sleep(50), DC_GetRefresh(Getlist)} PARENT o4TabPage
DCREAD GUI FIT TITLE "TabTest" ADDBUTTONS to lOK
return
- MIchael
Re: Tabpage Color under 254
Tom and Michael -
I made 2 changes to the tabpage color system in build 254.
1. Requested by Tom - switch off :visualStyle if a color clause exists.
2. Requested by Brian Wolfsohn - Support Code blocks for color (as documented).
The 2nd issue never did work. It only evaluated the code block when the tabpage was first created but then never after that.
I fixed that, but now that causes a problem for Michael.
The existence of the code block overrides any settings in your code because the code block is always evaluated on a DC_GetRefresh().
Michael - This should fix your problem (make sure your color clause is not a codeblock) :
I made 2 changes to the tabpage color system in build 254.
1. Requested by Tom - switch off :visualStyle if a color clause exists.
2. Requested by Brian Wolfsohn - Support Code blocks for color (as documented).
The 2nd issue never did work. It only evaluated the code block when the tabpage was first created but then never after that.
I fixed that, but now that causes a problem for Michael.
The existence of the code block overrides any settings in your code because the code block is always evaluated on a DC_GetRefresh().
Michael - This should fix your problem (make sure your color clause is not a codeblock) :
Code: Select all
@ 00,00 DCTABPAGE o4TabPage ;
CAPTION "ShF8 - Numbers" ;
PARENT oDlg ;
COLOR if(M->USER == "PCH", {GRA_CLR_BLACK, GRA_CLR_BACKGROUND}, {GRA_CLR_BLACK, GraMakeRGBColor({205,205,175})})
The eXpress train is coming - and it has more cars.
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Tabpage Color under 254
Roger -
thanks.. yes the second change is what causes my trouble..
The codeblock did only fire the first time when the tab was created..
I could fix it by using a variable for the background like:
if .. <something>
nBackColor := GRA_CLR_RED
else
nBackColor := GRA_CLR_GREEN
endif
and code:
DCTABPAGE bla lba
COLOR {||{GRA_CLR_BLACK, nBackColor} }
and simply change the color by changing the var nBackColor
if <something>
nBackColor := GRA_CLR_SCHWEINCHENROSA
elseif <something else>
nBackColor := GRA_CLR_FROSCHGRÜN
else
nBackColor := GRA_CLR_LASS_WIE_ES_IST
endif
- Michael
thanks.. yes the second change is what causes my trouble..
The codeblock did only fire the first time when the tab was created..
I could fix it by using a variable for the background like:
if .. <something>
nBackColor := GRA_CLR_RED
else
nBackColor := GRA_CLR_GREEN
endif
and code:
DCTABPAGE bla lba
COLOR {||{GRA_CLR_BLACK, nBackColor} }
and simply change the color by changing the var nBackColor
if <something>
nBackColor := GRA_CLR_SCHWEINCHENROSA
elseif <something else>
nBackColor := GRA_CLR_FROSCHGRÜN
else
nBackColor := GRA_CLR_LASS_WIE_ES_IST
endif
- Michael
Re: Tabpage Color under 254
Michael -
Yes, I was going to suggest that as another possible solution.
It looks like you already figured that out.
Roger
Yes, I was going to suggest that as another possible solution.
It looks like you already figured that out.
Roger
The eXpress train is coming - and it has more cars.
-
- Posts: 33
- Joined: Wed Jan 27, 2010 10:23 pm
Re: Tabpage Color under 254
Roger -
I now changed all the code that way -- was not a big deal...
Pls leave it as it is ;o))
Thks
- Michael
I now changed all the code that way -- was not a big deal...
Pls leave it as it is ;o))
Thks
- Michael
Re: Tabpage Color under 254
Hi, Michael.
If you post code to the forum, use the "CODE" button or code-tags to embed it. This is much easier to read:
If you post code to the forum, use the "CODE" button or code-tags to embed it. This is much easier to read:
Code: Select all
FUNCTION Michael(lEverythingWorks)
IF lEverythingWorks
FindAReasonToMoanAnyWay()
ENDIF
RETURN TheRiverNile
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."