NTabControl with NTabControlRenderer doesn't work


Author
Message
Craig Swearingen
Craig Swearingen
Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)
Group: Forum Members
Posts: 99, Visits: 654
Thanks for the tip.  I tried also overriding the DrawSkinBackground and I was able to get this event when a skin was present and do a different highlight.  I think that can work for now.
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Craig,

Here is the source of the original DrawTabBackground:

protected virtual void DrawTabBackground(Graphics g)
{
   if(m_Skin != null)
   {
      if(DrawSkinBackground(g))
         return;
   }

   switch(m_Tab.m_Info.Style)
   {
      case TabStyle.Standard:
         DrawTabStandardBackground(g);
         break;
      case TabStyle.Buttons:
         DrawTabButtonsBackground(g);
         break;
      case TabStyle.MultiDocument:
         DrawTabMultiDocBackground(g);
         break;
   }
}

May be better solution will be to override DrawTabStandardBackground if you use only standard tab style, and DrawSkinBackgorund methods.

Best Regards,
Nevron Support Team


Craig Swearingen
Craig Swearingen
Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)Supreme Being (97 reputation)
Group: Forum Members
Posts: 99, Visits: 654

I've added a custom NTabControlRenderer to my NTabControl so I can paint the tab background the mouse over highlight color at times.  I've overridden the DrawTabBackground method to do this drawing.

It doesn't get called when the application has a skin (i.e. like MacOS).  It works as expected when there is no skin.

Is there any way I can make this work with a skin?


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search