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.
Syncfusion Feedback

Focus Rectangle on TabPage

Thread ID:

Created:

Updated:

Platform:

Replies:

3227 Mar 9,2003 04:50 PM UTC May 6,2003 11:51 AM UTC Windows Forms 6
loading
Tags: Tools
Ivan Pelly
Asked On March 9, 2003 04:50 PM UTC

Is there a way to suppress the dotted focus rectangle on the current tab (so that my tab doesn't look like a tiny coupon)? Thanks!

Administrator [Syncfusion]
Replied On March 11, 2003 06:09 PM UTC

Ivan, Our current version doesn't support overriding this behavior. We have however made way to do this in our upcoming release. In our next release (due end of this month) you can do the following: You can easily do this by handling the DrawItem event, adjusting the DrawTabEventArgs as follows and delegating drawing to the default drawing logic. private void tabControlExt1_DrawItem(object sender, Syncfusion.Windows.Forms.Tools.DrawTabEventArgs drawItemInfo) { // To indicate that the tab gets drawn as if it’s not focused (without the focus rect). drawItemInfo.State &= ~DrawItemState.Focus; // Then forward drawing to default drawing logic. drawItemInfo.DrawBackground(); drawItemInfo.DrawInterior(); drawItemInfo.DrawBorders(); }

Ramesh Praveen [Syncfusion]
Replied On May 1, 2003 05:15 PM UTC

In VB: Private Sub tabControlExt1_DrawItem(ByVal sender As Object, ByVal drawItemInfo As Syncfusion.Windows.Forms.Tools.DrawTabEventArgs) Handles tabControlExt1.DrawItem 'drawItemInfo.State = drawItemInfo.State And (Not DrawItemState.Focus) ' Then forward drawing to default drawing logic. drawItemInfo.DrawBackground() drawItemInfo.DrawInterior() drawItemInfo.DrawBorders() End Sub

Alexandre Nicholas
Replied On May 2, 2003 04:47 PM UTC

FocusOnTabClick = false ?

Ramesh Praveen [Syncfusion]
Replied On May 5, 2003 12:00 PM UTC

When you set focusontabclick to false, the tab control will not take focus when you click on a tab. If that is ok with you, then go ahead and use it. Regards, Praveen Ramesh

Alexandre Nicholas
Replied On May 5, 2003 12:55 PM UTC

> When you set focusontabclick to false, the tab control will not take focus when you click on a tab. If that is ok with you, then go ahead and use it. > > Regards, > Praveen Ramesh > If you put the tabcontrol with tabindex=0 and you set focusontabclick=false, the focus is there, try it . Put on the form only the TabControl. Just this one,and you will see that focusontabclick=false doesn't work. But i have more than 1 control, so i haven't got the problem. this post in only to alert you of this bug.

Ramesh Praveen [Syncfusion]
Replied On May 6, 2003 11:51 AM UTC

Alexandre, You should also set TabStop = false, then the tabcontrol itself will not have focus. Regards, Praveen

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.

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

;