Click here to Skip to main content
15,902,198 members
Home / Discussions / C#
   

C#

 
QuestionNumericUpDown control increment value change Pin
Blubbo17-May-12 7:38
Blubbo17-May-12 7:38 
AnswerRe: NumericUpDown control increment value change Pin
OriginalGriff17-May-12 8:07
mveOriginalGriff17-May-12 8:07 
QuestionCannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 6:47
Xarzu17-May-12 6:47 
AnswerRe: Cannot Edit or Add Path to Reference File Pin
Richard MacCutchan17-May-12 7:00
mveRichard MacCutchan17-May-12 7:00 
GeneralRe: Cannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 7:31
Xarzu17-May-12 7:31 
AnswerRe: Cannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 7:30
Xarzu17-May-12 7:30 
QuestionUser control as base class Pin
Ronny Portier17-May-12 4:50
Ronny Portier17-May-12 4:50 
AnswerRe: User control as base class Pin
BobJanova17-May-12 4:55
BobJanova17-May-12 4:55 
GeneralRe: User control as base class Pin
Ronny Portier17-May-12 5:27
Ronny Portier17-May-12 5:27 
Hi,

Now I do :
C#
public partial class PricePanelBase : UserControl
{
    public PricePanelBase()
    {
        InitializeComponent();
        InstallControls();
    }

    protected virtual void GetControls(ControlCollection Ctrls)
    {
    }

    private int InstallControls()
    {
        ControlCollection Ctrls = new ControlCollection(CPanel);

        GetControls(Ctrls);

        foreach (Control Ctrl in Ctrls)
            CPanel.Controls.Add(Ctrl);

        return Ctrls.Count;
    } ...


C#
public partial class PricePanel : PricePanelBase
{
    public PricePanel()
    {
        InitializeComponent();
    }

    protected override void GetControls(ControlCollection Ctrls)
    {
        DataGridView GrdVw = new DataGridView();

        GrdVw.Name = "dataGridView1";
        GrdVw.Location = new Point(3, 35);
        GrdVw.Size = new Size(438, 146);

        Ctrls.Add(GrdVw);
    }...


When I drag the PricePanel control in a form I get an ArgumentException:
'Child' is not a child control of this parent.
and the control doesn't get drawn.
AnswerRe: User control as base class Pin
RobCroll18-May-12 2:19
RobCroll18-May-12 2:19 
QuestionHow to read and insert files from Application directory in to Data base in C# Pin
ChandrakanthGaddam17-May-12 1:04
ChandrakanthGaddam17-May-12 1:04 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Dave Kreskowiak17-May-12 2:13
mveDave Kreskowiak17-May-12 2:13 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Luc Pattyn17-May-12 2:13
sitebuilderLuc Pattyn17-May-12 2:13 
QuestionDisposing GDI objects Pin
thalavi17-May-12 0:35
thalavi17-May-12 0:35 
AnswerRe: Disposing GDI objects Pin
Dave Kreskowiak17-May-12 2:10
mveDave Kreskowiak17-May-12 2:10 
AnswerRe: Disposing GDI objects Pin
Luc Pattyn17-May-12 2:11
sitebuilderLuc Pattyn17-May-12 2:11 
QuestionQuestion Related To Yesterdays Array of String..... Pin
glennPattonWork316-May-12 23:44
professionalglennPattonWork316-May-12 23:44 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
BobJanova16-May-12 23:59
BobJanova16-May-12 23:59 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 0:13
professionalglennPattonWork317-May-12 0:13 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
BobJanova17-May-12 4:52
BobJanova17-May-12 4:52 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 5:37
professionalglennPattonWork317-May-12 5:37 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 1:05
professionalglennPattonWork317-May-12 1:05 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:17
sitebuilderLuc Pattyn17-May-12 2:17 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 2:28
professionalglennPattonWork317-May-12 2:28 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:59
sitebuilderLuc Pattyn17-May-12 2:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.