PageControl - MenuButton TabMenu and VCL styles

Components on the Raize Panels palette: panels, group bars, page controls, splitters, toolbars, status bars, group boxes, etc.

Re: PageControl - MenuButton TabMenu and VCL styles

Postby Raize Support » Mon Mar 23, 2015 6:30 pm

Yes, we could do something like that, but there would be more checks that are necessary. Like only doing this in XE6 and XE7. And while the fix apparently fixes the tab menu issue, there are other related issues with the TPopupMenu and VCL Styles that would not get fixed with this. While we have made modifications in our components to handle bugs in the VCL in the past, it may just be easier to upgrade to the next release of Delphi to get the full correct solution.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 605
Joined:
Fri Mar 25, 2011 9:04 pm

Re: PageControl - MenuButton TabMenu and VCL styles

Postby radcpuman69 » Thu Jun 04, 2015 12:45 pm

I'm trying to follow this thread to see what I need to do with a VCL Styles issue in Delphi XE7, update 1 with Raize 6.1.10.

I have a TrzPageControl that is embedded a few layers down (tform,tframe,tpagecontrol,ttabesheet,trzpagecontrol) that for some reason isn't picking up the styles for the tabs. Everything else on this busy page is colored correctly. If I create a simple form with a tpagecontrol it works fine.

Any thoughts on how I can force it to color correctly?
radcpuman69
 
Posts: 10
Joined:
Thu Oct 18, 2012 3:56 pm

Re: PageControl - MenuButton TabMenu and VCL styles

Postby Raize Support » Thu Jun 04, 2015 2:43 pm

Hi,

This particular thread was focused on the dropdown menu used in the TRzPageControl and TRzTabControl to show all of the available tabs.

In regards to what you are describing it sounds like the tabs themselves are not displaying the colors you are expecting. Is that correct? Is it possible for you to create a test project that has all of the control nesting that you are using as well as the selected VCL Style? If so, please send the source code to support@raize.com and we'll take a look.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 605
Joined:
Fri Mar 25, 2011 9:04 pm

Re: PageControl - MenuButton TabMenu and VCL styles

Postby radcpuman69 » Thu Jun 04, 2015 3:03 pm

I've continued to work on this and discovered that the option "use colored tabs" was set to true. This was causing the tabs to be whited out. The highlight would still be yellow (auric vcl style theme) when I moved the mouse over but otherwise the tabs would be a light gray color instead of the dark gray that the rest of the theme uses.

You can easily reproduce the connection.

Create a new project and form. Add a trzpagecontroler and 2 sheets.
Set the option for UseColoredTabs to true.
Set the VCL style theme to Auric.

Run it.

Tabs should be grayed out.

I don't know why the that option was set on that control. But even this code had no affect on the tab color.

RzPageControl1.TabColors.HighlightBar := TStyleManager.ActiveStyle.GetSystemColor(clhighlight);
RzPageControl1.TabColors.shadow := TStyleManager.ActiveStyle.GetSystemColor(clbtnface);
RzPageControl1.TabColors.unselected := TStyleManager.ActiveStyle.GetSystemColor(clwindow);

Turning off the option solved my issue, but not sure what the desired result of that option should be.

Thanks
Allen

PS, enjoyed your presentations at DDD this year.
radcpuman69
 
Posts: 10
Joined:
Thu Oct 18, 2012 3:56 pm

Re: PageControl - MenuButton TabMenu and VCL styles

Postby Raize Support » Fri Jun 05, 2015 2:00 am

Hi Allen,

Thanks for posting the follow-up. Yes, the UseColoredTabs property in effects instructs the control to use the Color property of each tab sheet instead of the style color. If you are going to use a particular style and you want to use a particular color that is not part of the style, then turning on this property and setting each tab sheet's Color property would allow you to do this. But if you are going to allow the user to switch among several styles, then turning UseColoredTabs off is certainly easiest solution. Another option would be to manually set the colors of the tabs dynamically when the style is changed. You could use the ActiveStyleSystemColor function to get an equivalent color for the current style based on system color value such as clBtnFace.

I'm glad you enjoyed the presentations at DDD this year. I had a lot of fun putting those together.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 605
Joined:
Fri Mar 25, 2011 9:04 pm

Previous

Return to Panels

Who is online

Users browsing this forum: No registered users and 1 guest