PDA

View Full Version : TabWorkspace :: ComThemedBackColor compatibility issue ?



raveens
8-Feb-2017, 09:45 PM
Hi DAW,

We have the following code within the oCommandBarSystem object that works well in DF18.2

The code simply disables the CJThemeBackColor and allows us to apply custom images or colours to the ClientArea - this is especially useful when changing workspaces - for instance from "live" to "testing"/"training" data sets

18.2 Code



// oCommandBarSystem
Procedure OnCreateCommandBars
Variant vTab
Handle hoTab

Forward Send OnCreateCommandBars

Get ComShowTabWorkspace False to vTab

Get Create (RefClass(cCJTabWorkspace)) to hoTab
Set pvComObject of hoTab to vTab
Set ComThemedBackColor of hoTab to False
Send Destroy of hoTab
End_Procedure


However, in DF19.0 when pbTabbedWorkspaces = True the client area is BLACK and you're unable to set/change its colour - it just remains BLACK.

19.0 Code



Set pbTabbedWorkspaces to True
Procedure OnCreateTabbedWorkspace Handle hoTabWorkspace Handle hoTabPaintManager
Set ComThemedBackColor of hoTabWorkspace to False
End_Procedure



Is there a workaround for this?

Thanks

raveens
22-Feb-2017, 10:02 PM
FYI

Still doesn't work on DF19 A2

But found a workaround (better approach) using the cCJTabPaintManagerColorSet class

All good !!!

Nils G. Svedmyr
23-Feb-2017, 04:33 AM
Hi Raveen,

And the solution was...?

raveens
23-Feb-2017, 07:43 PM
And the solution was...?

Hi Nils,

We still can't get the ClientArea to change colors when pbTabbedWorkspaces=True - I feels its a CJ/OCX issue as the whole ClientArea is BLACK

But as a workaround, the following helps give the user some visual feedback that he/she is NOT on the live system or default workspace.



Set pbTabbedWorkspaces To True
Procedure OnCreateTabbedWorkspace Handle hoTabWorkspace Handle hoTabPaintManager
Handle hoColorSet
Variant vColorSet
Integer iColor

Get ComColorSet Of hoTabPaintManager To vColorSet

Get Create (RefClass(cCJTabPaintManagerColorSet)) To hoColorSet
Set pvComObject Of hoColorSet To vColorSet

Set ComControlFace Of hoColorSet To clRed
Set ComFrameBorder Of hoColorSet To clRed

Set ComHeaderFaceDark Of hoColorSet To clRed
Set ComHeaderFaceLight Of hoColorSet To clYellow

Send Destroy Of hoColorSet
End_Procedure


I'm sure there are other settings but these are what I've found so far...

Garret Mott
23-Feb-2017, 09:00 PM
This is an issue for me. I've had a different background for test/dev areas since 14 at least - maybe 12. Absolutely crucial IMO.

Hopefully DAW can look at this as breaking old code is never good.

Stephen W. Meeley
23-Feb-2017, 09:21 PM
Garret,

We didn't "break old code". If you are not using tab workspaces (a new feature, so there can't be any old code for it) the old code will work fine. It just doesn't seem to work when using the (again, new) tab workspaces and while we'll certainly look into it, as Raveen points out, it may be out of our control completely.

Garret Mott
23-Feb-2017, 09:24 PM
Ah - my apologies, I confused it with cCJTabWorkspace - and I use Nils' code to change the graphic.

Bob Worsley
23-Feb-2017, 09:41 PM
it may be out of our control completely.No pun intended?

raveens
11-Apr-2017, 11:52 PM
Hi DAW,

After much testing, I found that this is ONLY an issue or 'bug' if you enable groups within the cCJTabWorkspace

If you comment-out the "Send ComEnableGroups" within EnableTabbedWorkspace procedure then the background is respected and the client area is NOT black.

Tested in current and prior versions of the OCX - same results in OCX 16.3.1 thru to OCX 17.3.0

FYI.