久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <i id='00Ivi'><tr id='00Ivi'><dt id='00Ivi'><q id='00Ivi'><span id='00Ivi'><b id='00Ivi'><form id='00Ivi'><ins id='00Ivi'></ins><ul id='00Ivi'></ul><sub id='00Ivi'></sub></form><legend id='00Ivi'></legend><bdo id='00Ivi'><pre id='00Ivi'><center id='00Ivi'></center></pre></bdo></b><th id='00Ivi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='00Ivi'><tfoot id='00Ivi'></tfoot><dl id='00Ivi'><fieldset id='00Ivi'></fieldset></dl></div>

    <tfoot id='00Ivi'></tfoot>

      <small id='00Ivi'></small><noframes id='00Ivi'>

      <legend id='00Ivi'><style id='00Ivi'><dir id='00Ivi'><q id='00Ivi'></q></dir></style></legend>
      • <bdo id='00Ivi'></bdo><ul id='00Ivi'></ul>

      如何更改 C# winforms 中未使用空間選項卡的背景顏

      How to change the background color of unused space tab in C# winforms?(如何更改 C# winforms 中未使用空間選項卡的背景顏色?)

          <bdo id='guFtM'></bdo><ul id='guFtM'></ul>
          1. <legend id='guFtM'><style id='guFtM'><dir id='guFtM'><q id='guFtM'></q></dir></style></legend>

              <tbody id='guFtM'></tbody>

          2. <small id='guFtM'></small><noframes id='guFtM'>

          3. <i id='guFtM'><tr id='guFtM'><dt id='guFtM'><q id='guFtM'><span id='guFtM'><b id='guFtM'><form id='guFtM'><ins id='guFtM'></ins><ul id='guFtM'></ul><sub id='guFtM'></sub></form><legend id='guFtM'></legend><bdo id='guFtM'><pre id='guFtM'><center id='guFtM'></center></pre></bdo></b><th id='guFtM'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='guFtM'><tfoot id='guFtM'></tfoot><dl id='guFtM'><fieldset id='guFtM'></fieldset></dl></div>
              1. <tfoot id='guFtM'></tfoot>

                本文介紹了如何更改 C# winforms 中未使用空間選項卡的背景顏色?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                  |Tab1|Tab2|Tab3| {    }
                  |                     |
                  |                     |
                  |                     |
                  |                     |
                  |_____________________|
                

                我可以改變 Tabbackcolorforecolor.. 但我想改變那個 { } 的顏色 --> 空白空間可以做到這一點...它顯示默認的winforms顏色..幫助我在dis..

                I am able to change the backcolor and forecolor of Tab.. but I want to change the color of that { } -- > Empty space is this possible to do that. .. It shows default winforms color..help me in dis..

                 private void Form1_Load(object sender, EventArgs e)
                    {
                
                    }
                
                
                    private void tabControl1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
                    {
                        Font fntTab;
                        Brush bshBack;
                        Brush bshFore;
                
                        if ( e.Index == this.tabControl1.SelectedIndex)
                        {
                            fntTab = new Font(e.Font, FontStyle.Bold);
                            bshBack = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds, SystemColors.Control, SystemColors.Control, System.Drawing.Drawing2D.LinearGradientMode.BackwardDiagonal);
                            bshFore = Brushes.Black;
                            //bshBack = new System.Drawing.Drawing2D.LinearGradientBrush(e.Bounds, Color.LightSkyBlue , Color.LightGreen, System.Drawing.Drawing2D.LinearGradientMode.BackwardDiagonal);
                            //bshFore = Brushes.Blue;
                        }
                        else
                        {
                            fntTab = e.Font;
                            bshBack = new SolidBrush(Color.Red);
                            bshFore = new SolidBrush(Color.Aqua);
                
                            //bshBack = new SolidBrush(Color.White);
                            //bshFore = new SolidBrush(Color.Black);
                        }
                
                        string tabName  = this.tabControl1.TabPages[e.Index].Text;
                        StringFormat sftTab = new StringFormat();
                        e.Graphics.FillRectangle(bshBack, e.Bounds);
                        Rectangle  recTab = e.Bounds;
                        recTab = new Rectangle( recTab.X,  recTab.Y + 4,  recTab.Width,  recTab.Height - 4);
                        e.Graphics.DrawString(tabName, fntTab, bshFore, recTab, sftTab);
                
                    }
                

                推薦答案

                我認為給那個空間一個顏色的唯一方法是覆蓋窗口的 OnPaintBackground 方法,所以把這個粘貼到你的表單(窗口)

                I think the only way to give that space a color is to override the OnPaintBackground method of the window, so just paste this on your form (window)

                您還必須將外觀屬性更改為正常"

                you must also change the Appearance Property to "Normal"

                private void Form1_Load(object sender, EventArgs e)
                {
                
                }
                
                protected override void OnPaintBackground(PaintEventArgs e)
                {
                    base.OnPaintBackground(e);
                    Rectangle lasttabrect = tabControl1.GetTabRect(tabControl1.TabPages.Count - 1);
                    RectangleF emptyspacerect = new RectangleF(
                            lasttabrect.X + lasttabrect.Width + tabControl1.Left,
                            tabControl1.Top + lasttabrect.Y, 
                            tabControl1.Width - (lasttabrect.X + lasttabrect.Width), 
                            lasttabrect.Height);
                
                    Brush b = Brushes.BlueViolet; // the color you want
                    e.Graphics.FillRectangle(b, emptyspacerect );
                }
                

                對我來說效果很好

                這篇關于如何更改 C# winforms 中未使用空間選項卡的背景顏色?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
              2. <legend id='esOpS'><style id='esOpS'><dir id='esOpS'><q id='esOpS'></q></dir></style></legend>

                      <i id='esOpS'><tr id='esOpS'><dt id='esOpS'><q id='esOpS'><span id='esOpS'><b id='esOpS'><form id='esOpS'><ins id='esOpS'></ins><ul id='esOpS'></ul><sub id='esOpS'></sub></form><legend id='esOpS'></legend><bdo id='esOpS'><pre id='esOpS'><center id='esOpS'></center></pre></bdo></b><th id='esOpS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='esOpS'><tfoot id='esOpS'></tfoot><dl id='esOpS'><fieldset id='esOpS'></fieldset></dl></div>

                        <small id='esOpS'></small><noframes id='esOpS'>

                          <tbody id='esOpS'></tbody>

                        • <bdo id='esOpS'></bdo><ul id='esOpS'></ul>
                        • <tfoot id='esOpS'></tfoot>
                          主站蜘蛛池模板: 午夜在线免费观看视频 | 婷婷桃色网| 久久区二区 | 91看国产 | 一区二区三区四区日韩 | 91原创视频在线观看 | 日韩在线免费 | 亚洲精品一区中文字幕 | www.久久久久久久久 | 国产精品久久久99 | 无码一区二区三区视频 | 视频一区欧美 | 久国产 | 亚洲综合久久精品 | 亚洲va在线va天堂va狼色在线 | 亚洲自拍偷拍免费视频 | 一区二区三区在线播放 | 日韩视频在线一区二区 | 国产欧美精品一区二区三区 | 黄色片网站在线观看 | 国产 日韩 欧美 在线 | 久久国产综合 | 福利视频网站 | 在线观看毛片网站 | 欧美簧片 | 日本欧美在线 | 精品1区 | 黄色在线免费看 | 男女下面一进一出网站 | 亚洲成人999 | 国产一区久久 | 美女视频h | 国产三级在线观看播放 | 日韩精品视频在线观看一区二区三区 | 97视频人人澡人人爽 | 综合久久久 | 欧美日本韩国一区二区三区 | 久久综合狠狠综合久久综合88 | 91热在线| 成人欧美一区二区三区在线播放 | 亚洲第一视频网 |