Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with PageControl/TabSheet in Alexandria #300

Open
luebbe opened this issue Jan 30, 2023 · 0 comments
Open

Problem with PageControl/TabSheet in Alexandria #300

luebbe opened this issue Jan 30, 2023 · 0 comments

Comments

@luebbe
Copy link
Contributor

luebbe commented Jan 30, 2023

In Alexandria there is a problem with tabsheets, when an imagelist is assigned to the pagecontrol. In the attached example you can see that one tabsheet has an icon and the other doesn't. Unfortunately the Alexandria default drawing routine still reserves the width of the icon on the left hand side of the tab (plus a lot of space between icon and text), but calculates the tab width so that the text will fit. This leads to the text wrapping on the tab or overwriting the right hand border of the tab (seems to depend on the chosen VCL-style).

grafik

Unfortunately Vcl.ComCtrls has its own TTabControlStyleHook which is registered in the TTabSheet class constructor. This leads to the effect that even though the vcl-styles-utils TSysStyleManager.RegisterSysStyleHook(WC_TABCONTROL, TSysTabControlStyleHook) is run, it is never called, because the Vcl.ComCtrls style hook takes precedence.

Is there a way to unregister the Vcl.ComCtrls style hook? My understanding isn't deep enough, I haven't found a solution for this problem.

PageControl.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant