Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List Of SQL Servers
Message
From
18/12/2006 06:03:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01178456
Message ID:
01178502
Views:
20
>Whoops - I just happened to notice it haven't tried it (don't they test their sample code ? or have I just answered my own question ? ). While I have your ear do you know of any good sources of info for creating custom class designers ? e.g. adding ones own custom tabpages to a custom tabcontrol at design time ?

You mean something like this?
using System;
using System.Drawing;
using System.Windows.Forms;

public class myForm : Form
{
    private TabControl myTabControl;
    private Button cmdAddPage;

    public myForm()
    {
        this.myTabControl = new TabControl();
        this.myTabControl.Location = new Point(25, 25);
        this.myTabControl.Size = new Size(250, 250);
        this.ClientSize = new Size(300, 350);
        this.cmdAddPage = new Button();

        this.cmdAddPage.Location = new Point(25,280);
        this.cmdAddPage.Text = "Add a page";
        this.cmdAddPage.Click += delegate { AddTabPage(); };
        this.Controls.Add(myTabControl);
        this.Controls.Add(cmdAddPage);
    }

   private void AddTabPage()
   {
        TabPage pg = new TabPage( );
        myTabControl.TabPages.Add( pg );
        pg.Text = String.Format("Tab page#{0}",myTabControl.TabPages.Count);

       Label lbl = new Label();
       TextBox tb  = new TextBox();

       pg.Controls.AddRange( new Control[] {lbl, tb});

       lbl.Text = ((Control)lbl).Parent.Text;
       lbl.Location = new Point(10,10);
       lbl.Size = new Size(100,20);

       tb.Location = new Point(110,10);
       tb.Size = new Size(100,20);
    }

    static void Main()
    {
 Application.EnableVisualStyles() ;     
 Application.Run(new myForm());
    }
}
Oh you were talking about design time. I'm not good with designers and more code oriented.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform