Forum > General
TabControl "Style"
(1/1)
Porbitz:
Hi All,
I have Lazarus 1.8.4 and I'm using a TTabControl component, from the ComCtrls unit. I've set its Style property to tsFlatButtons, but both on design-time and runtime the control keeps showing the "default" tabs (see attachments, btw, the font in runtime is okay, I've configured it). Do I need to do something else to see the buttons instead of the tabs? Is this property not implemented or does it have a bug? I've googled this issue and searched on this forum; alas I've found nothing about it.
Thanks!!
ASerge:
--- Quote from: Porbitz on October 16, 2018, 02:09:09 pm ---Is this property not implemented or does it have a bug?
--- End quote ---
I think this property is not implemented.
By source:
TCustomTabControl.SetStyle equals FStyle := NewValue and nothing more.
TTabControl.SetStyle overrided and do mistakes:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- inherited SetStyle(AValue); if FStyle=AValue then exit; FStyle:=AValue; TTabControlNoteBookStrings(FTabs).Style := AValue;By inherited behavior, the condition in line 2 is always true (always exit).
Even we remove the call to the inherited method, still TTabControlNoteBookStrings.SetStyle calls TTabControlNoteBookStrings.NoteBook.SetStyle. NoteBook is a descendant of TPageControl, which calls TCustomTabControl.SetStyle i.e. again nothing useful.
Navigation
[0] Message Index