Page 1 of 1

TabControl Left Alignment

Posted: Sat Sep 17, 2022 11:24 am
by travisc
So I'm working on a new project and trying to use the tab control as a way to move from one process to another. The problem is when i have the tab alignment set to top or bottom the color matches the form color, but when i change the alignment to left or right, it defaults to the control color. On another test script i am using the DrawItem to change the color of the tabs, which works great. But Is there a way to change this color on the tab control when the alignment is set to right or left.
Tab-Matching Form color.PNG
Tab-Matching Form color.PNG (5.72 KiB) Viewed 594 times

Tab-Not Matching Form color.PNG
Tab-Not Matching Form color.PNG (10.86 KiB) Viewed 594 times

Re: TabControl Left Alignment

Posted: Sat Sep 17, 2022 7:12 pm
by jvierra
It appears that you will have to draw the background to match the forms background. I believe this is an old issue with the tab control.

Re: TabControl Left Alignment

Posted: Sat Sep 24, 2022 7:48 am
by travisc
Does anyone have a code example to do this? Right now i have the code to change the tab colors, but cant figure out how to change the background of the tab control itself. When i try to just use the $tabcontrol1.BackColor, but it doesnt take. i think its a read only property.

Re: TabControl Left Alignment

Posted: Sat Sep 24, 2022 12:01 pm
by jvierra
The BackColor does not change the tab control color it changes the client area.