Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

CristianConrads

@CristianConrads
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Open Form Incide another Form
    C CristianConrads

    Hi evirione For any one interest in this Here I publish my solution Object in Form1 splitContainer1 tabControl1 (in the right panel of the splitContainer1) The tabControl does not have any page on design. The left panel I intent to put a treeView, but for this code, there is a button button1 (in the left panel of the splitContainer1) this is the code for the button click event

      private void button1\_Click(object sender, EventArgs e)
      {
         TabPage newTabPage = new TabPage("Form " + tabControl1.TabPages.Count);
         newTabPage.Size = new Size(tabControl1.Width, tabControl1.Height);
         Form2 newForm = new Form2(); 
         newForm.TopLevel = false; 
         newForm.Parent = this;
         newForm.Visible = true;
         newForm.Location = newTabPage.Location;
         newForm.Location = new Point(3, 3);
         newForm.Size = new Size(newTabPage.Width - 3, newTabPage.Height - 3); 
         newForm.FormBorderStyle = FormBorderStyle.None;
         newTabPage.Controls.Add(newForm);
         tabControl1.TabPages.Add(newTabPage);
      }
    

    Becaus Microsoft does not provide the Tab control we all use in the IDE, that allow to close a tabpage with an X in the upper right corner, I have no alternative and just use a normal tabControl Now, in order to destroy the tabpage when closing the form created on each page. In Form2 I add a button, and the followin code.( this close the form and destroy the tab page.

      private void button1\_Click(object sender, EventArgs e)
      {
         TabPage tab = this.Parent as TabPage;
         TabControl tabControl = tab.Parent as TabControl;
         tabControl.TabPages.Remove(tab);
         this.Dispose();
      }
    

    Hope this help Cristian Conrads

    modified on Monday, March 2, 2009 7:05 PM

    C# data-structures sales tutorial question

  • Open Form Incide another Form
    C CristianConrads

    I think is a good idea But very complex to maintain We are all use of this kind of interface The IDE work exactly as I want: Multiple pages, im my case Forms The tree view is the solution explorer. How could be this so dificult to replicate. :( Cristian

    C# data-structures sales tutorial question

  • Open Form Incide another Form
    C CristianConrads

    I have seen this in 3P Component, I think it was .Net Bar But this is out of my budget, So I'm trying to develop a solution with the component that come with C#. If I find something I let you know. Cristian

    C# data-structures sales tutorial question

  • Open Form Incide another Form
    C CristianConrads

    Hi I create a main Form with a splitContainer In the Left panel I put a Tree View In the Right panel I like to open diferent forms according to de selected information in the treeview. Example Tre view - Item - Customer xxx When double click on on this customer a new CustomerFor with customer details open in Right panel If anoter customer yyy is selected a second CustomerForm open in the same panel A sort of tabContol cold be use to swich between Customer xxx and Customer yyy I try with MDE but I dont know hot to restrict the opening of the Child forms to the right panel of the splitContainer or anoder object capable of containing Forms. any clue?

    C# data-structures sales tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups