We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TabControlAdv drawItem event

Thread ID:





63345 Jul 2,2007 10:30 PM UTC Jun 1,2011 06:52 AM UTC WinForms 7
Tags: Tools
Anisha Menon
Asked On July 2, 2007 10:30 PM UTC

In my application , i'm using TabControlAdv.
I want to invoke the draw item events for all its tabs at certain points in my code.
How do i do that ?

this is the issue i'm having:
when i add tabs dynamically and the scroll button is present, then the tabs added after the scroll button appears, dont get invoked by the drawItem event on the tabControlAdv on my parent form.

Apart from this, i'd still like to know if i can trigger redrawing on my tab control tab pages.


JayaLakshmi [Syncfusion]
Replied On July 3, 2007 10:18 AM UTC

Hi Anisha,

Thank you for using Syncfusion products.

1) You can invoke the drawitem event of all tabs using the following cide snippet.

this.tabControlAdv1.DrawItem+=new Syncfusion.Windows.Forms.Tools.DrawTabEventHandler(tabControlAdv1_DrawItem);

2) I am not able to reproduce this issue. Run the below sample in which you could see the drawitem event raised for newly added tabs.


3) Do you want to have redrawing event for all tabs? Please provide more information.


Anisha Menon
Replied On July 3, 2007 09:19 PM UTC

thanks for that. i already use it.
but i need to invoke drawitems for all the tabs.

i noticed that in the round of draw items called when the tabscroll button appears , the number of times draw item is called equals the number of tabs, but the control collection for tabcontroladv is tabs+1(the tabscroll button).

so till the next round of drawitems are called, my new tab remains unrefreshed

JayaLakshmi [Syncfusion]
Replied On July 4, 2007 05:42 PM UTC

Hi Anisha,

I am able to reproduce this issue at my end.

Could you please create a Direct-Trac incident with the subject "DrawItem event is not invoked for the tabs that are added after tab scroll button- F63345" so that we could give more details regarding the fix?


Replied On May 6, 2011 09:51 PM UTC

Hi ,

I have a TabControlAdv control and i have added 3 tabpages to it.
On some criteria i want to repaint only the 3rd tabpage's tabname
i.e tab header .

So for that purpose i call drawitem event of TabControlAdv control but it never gets fired. And how do i paint the tab page's header ?

So can someone pls advice ?

Jeraldes J [Syncfusion]
Replied On May 9, 2011 12:01 PM UTC

Hi Neetu,

Thanks for the update.

We have developed a simple sample to demonstrate how to change the Header Text for the required TabPage. Please check with the same from the following link.

[Sample Link]


Please let us know if you have any concern.

J Jeraldes

Replied On May 9, 2011 02:59 PM UTC

so what was the solution for this issue ?

Vallarasu S [Syncfusion]
Replied On June 1, 2011 06:52 AM UTC

Hi Neetu,

Apologies for the delay in responding,

Both the behaviors you have reported were not reproduced on our end against the version
I have attached the sample used to test this behavior, you can notice the text in tab at index 2 is always 'Owner drawn' which is handled by the DrawItem event, and in the output window you can find DrawItem event is invoked for all the visible tabs.

Will you please check the sample to see if these issues were reproducible on you end, if it exists please let me know the steps to reproduce and your Essential Studio version.

Vallarasu S.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon