EasyTabs icon indicating copy to clipboard operation
EasyTabs copied to clipboard

TitleBarTab.cs - Make some properties public

Open Haltroy opened this issue 4 years ago • 1 comments

Some properties (like TabImage, Area etc.) are internal, thus making an override for BaseTabRendere.Render difficult since other programs can't access those properties. This PR fixed that by making those properties public so other apps (that use EasyTabs) can edit them, thus making process of "creating your own tab renderer" easy.

Example of error:

     ...
     namepace AppThatUsesEasyTabs {      
        public class SomeNewTabRenderer : BaseTabRenderer
        {
        
                 //...

        protected override void Render(Graphics graphicsContext, TitleBarTab tab, int index, Rectangle area, Point cursor, Image tabLeftImage, Image tabCenterImage, Image tabRightImage)
                {
                    if (base._suspendRendering)
                    {
                        return;
                    }
        
        			// If we need to redraw the tab image
        			if (tab.TabImage == null) // <--- Error: tab.TabImage cannot be found.
        
        ...

Haltroy avatar Sep 26 '20 09:09 Haltroy

I thought I should show an screenshot from VS so here it is: etabs-error

Haltroy avatar Sep 26 '20 10:09 Haltroy