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.
Unfortunately, activation email could not send to your email. Please try again.

TabControlAdv drawItem event

Thread ID:

Created:

Updated:

Platform:

Replies:

63345 Jul 2,2007 06:30 PM Jun 1,2011 02:52 AM Windows Forms 7
loading
Tags: Tools
Anisha Menon
Asked On July 2, 2007 06:30 PM

Hi,
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.

thanks,
anisha

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

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.

http://websamples.syncfusion.com/samples/Tools.Windows/F63345/main.htm

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

Regards,
Jaya

Anisha Menon
Replied On July 3, 2007 05:19 PM


Hi,
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 01:42 PM


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?

Regards,
Jaya

Neetu
Replied On May 6, 2011 05:51 PM

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 08:01 AM

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]

http://www.syncfusion.com/uploads/redirect.aspx?file=WF-TabHeader-TextChange-63345_9179b9ce.zip&team=development

Please let us know if you have any concern.

Regards,
J Jeraldes


Neetu
Replied On May 9, 2011 10:59 AM

so what was the solution for this issue ?


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

Hi Neetu,

Apologies for the delay in responding,

Both the behaviors you have reported were not reproduced on our end against the version 9.2.0.137.
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.

Regards
Vallarasu S.




TabControlAdvApp_1a9c8ef1.zip

CONFIRMATION

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.

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.

;