DOT.NET code again #xpa


Adrian Wick
 

Dear wizards.

can someone, for the love of God, explain to me how to code 3rd line of the following code in xpa (Controls.Add(simpleButton)).

private void CreateSimpleButton(int left, int top) { SimpleButton simpleButton = new SimpleButton(); Controls.Add(simpleButton); simpleButton.Text = "Show Settings Page"; simpleButton.ImageOptions.ImageList = imageCollection1; simpleButton.ImageOptions.ImageIndex = 0; simpleButton.Padding = new Padding(10); simpleButton.AutoSize = true; simpleButton.Location = new Point(left, top); simpleButton.Click += SimpleButton_Click; }

To me it looks like i need a Controls dotnet variable and add this button to the Controls. The button is on my form, but it has no text, no image, nothing ...

I know its friday, but ... I hate it when someone shows only a part of the code and not everything ...

Any info is appreciated!
Adrian

Join main@magicu-l.groups.io to automatically receive all group messages.