I've subclassed a TMSFMXTableViewEx:
Please read the following tip on how to subclass:
http://www.tmssoftware.com/site/tmsfmxpack.asp?s=faq&show=652
The tip is applied to TTMSFMXGrid but can be applied to any styleable control, simply replace grid with tableview
The link works but the method when implemented exactly as displayed except for the tableview makes no difference. Is some sort of customization required? Again, I'm not customizing anything via styles, just using the default. If I didn't have to use styles at all that would be vastly preferable.
Hi,
This is a requirement for inheriting from styled controls. You always need to return the default style. if you keep experiencing issues using this approach you can contact us directly by email and send us your test project. There is something simple missing that shows a blank TTMSFMXTableView.
When inheriting from TTMSFMXTableView, the code will work correctly. When inheriting from TTMSFMXTableViewEx, there is an additional level, so the style needs to be retrieved from the root TTMSFMXTableView class so the code need to change to:
- function TMyTableView.GetClassStyleName: String;
- begin
- Result := ClassParent.ClassParent.ClassName + ''style'';
- Delete(Result, 1, 1);
- end;
Pieter Scheldeman2016-09-05 09:08:28
Thank you for clearing that up. That was the issue!