Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TCategoryPanelGroup, scrollbars and bitmap styles (XE8)


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Dec 2, 2015 3:38 AM Last Post By: Martin Nijhoff Threads: [ Previous | Next ]
John Brazier

Posts: 2
Registered: 5/4/02
TCategoryPanelGroup, scrollbars and bitmap styles (XE8)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2015 3:37 AM
Dear All,

Am I the only one that is finding that the vertical scrollbar produced by TCategoryPanelGroup does NOT honour the style settings as produced by the bitmap style designer? The component's HeaderStyle is set to hsThemed, but the vertical scrollbar's style doesn't have such a setting. Note that all the other stuff (panels, buttons, edit boxes, etc) is honouring the style.

In the bitmap designer, the test shows the scrollbar working fine; but when the actual program is compiled and run you just get the default Windows scrollbar.

If anyone has any ideas I'd be very grateful, otherwise I'll raise a bug report.

prunesquallor at proproco dot co dot uk

Edited by: John Brazier on Nov 29, 2015 3:38 AM

Edited by: John Brazier on Nov 29, 2015 3:39 AM
Martin Nijhoff

Posts: 75
Registered: 8/26/10
Re: TCategoryPanelGroup, scrollbars and bitmap styles (XE8)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 2, 2015 3:38 AM   in response to: John Brazier in response to: John Brazier
Hi John,

Your question is more suitable for the "C++ Builder | VCL | Using Components" category.

Maybe too obvious to mention, but the scroll bar of a TCategoryPanelGroup is only painted in a custom visual style when its StyleElements property contains seBorder.

I don't have XE8, but in XE6 the scroll bar is painted correctly when a custom visual style is active and the TCategoryPanelGroup includes seBorder in its StyleElements property.

TCategoryPanelGroup uses TScrollingStyleHook to paint over the standard Windows scroll bars.

If you take a look at Vcl.ExtCtrls.pas, you should see a class constructor and class destructor for TCategoryPanelGroup, which register/unregister the style hook:

class constructor TCategoryPanelGroup.Create;
begin
  TCustomStyleEngine.RegisterStyleHook(TCategoryPanelGroup, TScrollingStyleHook);
end;
 
class destructor TCategoryPanelGroup.Destroy;
begin
  TCustomStyleEngine.UnRegisterStyleHook(TCategoryPanelGroup, TScrollingStyleHook);
end;


If no style hook is registered for TCategoryPanelGroup, you should raise a bug report and mention that the issue was introduced somewhere after XE6 Update 1.

--
Martin
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02