TPageControl: lacking functionality added
Original Reporter info from Mantis: Marcin Wiazowski
-
Reporter name:
Original Reporter info from Mantis: Marcin Wiazowski
- Reporter name:
Description:
Some Delphi properties were missing in TPageControl - in particular: HotTrack, RaggedRight, ScrollOpposite and Style (Style is very important, because it chooses the control's visual style).
Moreover, some of the already existing properties were working improperly - in particular: TabStop and UseRightToLeftAlignment.
Fortunately, adding/fixing these functionalities is quite easy - just by setting some flags properly in TWin32WSCustomTabControl.CreateHandle implementation. So I'm attaching a patch that fixes the issues.
Some more detailed description of changes that the patch makes:
A) TPageControl: lacking properties have been published (by uncommenting them)
B) In TWin32WSCustomTabControl.CreateHandle implementation:
- Since TWin32WSCustomTabControl is not a TCustomTabControl's descendant, it cannot access TCustomTabControl's protected fields - but we must read them, so THookCustomTabControl has been declared and is used instead of TCustomTabControl.
- TabPositionFlags array now uses also the UseRightToLeftAlignment setting - so page control works properly on RTL systems, and its behavior is now consistent with Delphi.
- A newly introduced TabStyleFlags array handles the Style setting.
- The OwnerDraw setting is also handled properly now (although OwnerDraw property is still not published in TPageControl - because this functionality is not currently supported by the LCL implementation at all; however, the user may create his own TCustomTabControl's descendant, so TWin32WSCustomTabControl.CreateHandle should handle the OwnerDraw setting properly).
- All other newly introduced code just sets the needed flags in the Flags variable.
Regards