To programmatically add a button control to a horizontal C1WebMenu, use the following code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim btn As Button = New Button
btn.Text = "Go!"
C1WebMenu1.Controls.Add(btn)
End Sub
· C#
private void Page_Load(object sender, System.EventArgs e)
{
Button btn = new Button();
btn.Text = "Go!";
C1WebMenu1.Controls.Add(btn);
}
· Delphi
procedure Page_Load(sender: System.Object; e: EventArgs)
var
bnt : Button;
begin
btn.Text := 'Go!';
C1WebMenu1.Controls.Add(btn);
end;
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |