Menu
  • HOME
  • TAGS

Deleting controls from a tabPage

c#,tabpage

By the time you remove Controls[i], the next time Controls[i] has changed, as the 2nd button might be the 1st after removal of a button. You might try to get all the buttons and save it to a temp collection, instead of directly referencing them with SelectedTab.Controls[i]: var buttons =...

How can I make a transparent tabPage?

c#,winforms,tabcontrol,transparent,tabpage

TabControl is a native Windows component, it always draws the tab pages opaque with no built-in support for transparency. Solving this requires a little helping of out-of-the-box thinking, a tab control with transparent tab pages simply devolves to just the tabstrip being visible. All you have to do is use...

Customize TabPage tabs like Process Flow Arrows in Microsoft Dynamics CRM 2015

c#,winforms,tabcontrol,system.drawing,tabpage

Sometimes I go crazy and pick up a challenge just for fun :-) Here is the result: I overlay the TabControl tabControl1 with a Panel tp. (Do pick better names!) Note that this must happen rather late or else the TabControl will pop to the top. I call them to...

TabPages in accordance to CheckedListBox

c#,tabcontrol,tabpage

You need to use ItemCheckEventArgs e not the CheckedListBox itself. e.index is gonna give you which item is checked/unchecked and e.CurrentValue is gonna give you wheter is checked/unchecked. What you need to consider is if the e.CurrentValue is unchecked that means it's actually gonna be checked because this is showing...

Is it possible to add an already created form to a tab control?

c#,windows,winforms,tabpage

"@Idle_Mind Nailed it, thank you. – Blankdud" It's possible by setting the TopLevel property of your Form2 instance to false at run-time, and then adding it to the TabPage controls collection before calling Show(). Note, however, that controls displayed in forms this way do not behave correctly with respect to...

Low quality image in TabPage header using TabControl ImageList

c#,.net,winforms,tabpage

Not sure if this answers your question, but have to post it as answer to include the snapshot. You might try below: Select the image list; Config the ColorDepth property, and set it from "Depth8bit" to "Depth32bit" Or simply change it in code: imageList1.ColorDepth = ColorDepth.Depth32Bit; ...

Anchor failed with tab page

c#,winforms,tabcontrol,tabpage

private void MainInterface_Paint(object sender, PaintEventArgs e) { PageTab.Refresh(); } solved the problem by each time i resizing my main interface, i called the refresh ...

What is the purpose of TabPage.Hide()

c#,winforms,show-hide,tabpage

The Hide() method just changes the Visible property. It's implemented in the Control class, which is the base class for all Windows Forms controls. That means that all controls have this method and property and it can't be hidden since that's how C# works. However, it's not meaningful for all...

Preventing user to click a Tab Page

c#,winforms,tabcontrol,tabpage

You can use the Selecting event: Create a class level variable: int lockedPage = -1; If it is set to the index of a TabPage you can select it but you can't leave it, i.e. you can't select any other page. private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { if (lockedPage...

Hiding TabPage from TabControl in Winform application

c#,winforms,tabcontrol,tabpage

Try This. It will hide and Show the Tab Pages without Control Lost. Hide TabPage and Remove the Header: this.tabPage1.Hide(); this.tabPage3.Hide(); this.tabPage5.Hide(); tabControl1.TabPages.Remove(tabPage1); tabControl1.TabPages.Remove(tabPage3); tabControl1.TabPages.Remove(tabPage5); Show TabPage and Visible the Header: tabControl1.TabPages.Insert(0,tabPage1); tabControl1.TabPages.Insert(2, tabPage3); tabControl1.TabPages.Insert(4, tabPage5); this.tabPage1.Show(); this.tabPage3.Show(); this.tabPage5.Show(); tabControl1.SelectedTab =...

Different sized TabPage items within the same TabControl

c#,winforms,resize,tabcontrol,tabpage

If you want to make one tab larger you can add a bunch of spaces in the tab's Text property until you get to the desired size. If you want to resize the TabControl for each tab I would add code to the SelectedIndexChanged event to resize the TabControl based...