or
Private Sub Add_Text(ByVal sorder As String, ByVal itab As Integer)
Dim txt As New RadTextBox
txt.Name = "Text_" & sorder
txt.Multiline = True
txt.ScrollBars = ScrollBars.Both
Me.RadTabStrip1.SelectedTab = Me.RadTabStrip1.Items(itab)
Me.TabItem1.ContentPanel.Controls.Add(txt)
itab is the tab I want to add the control to, it always adds the control to my first tab on the RadTabStrip control.
Is there anywa to add this optionbuttons in design mode? if not it will be a great feature. Actually we are migrating from Infragistics to Telerik and this is a feture the we have in Infragistics.
RadButtonElement optionsButton = new RadButtonElement();
optionsButton.Text = "Options";
optionsButton.Alignment = ContentAlignment.TopRight;
optionsButton.Padding = new Padding(3);
optionsButton.Margin = new Padding(3);
optionsButton.TextImageRelation = TextImageRelation.ImageBeforeText;
optionsButton.Image = global::Telerik.Examples.WinControls.Properties.Resources.optionsButton;
RadButtonElement exitButton = new RadButtonElement();
exitButton.Text = "Exit";
exitButton.Alignment = ContentAlignment.TopRight;
exitButton.Padding = new Padding(3);
exitButton.Margin = new Padding(3);
exitButton.TextImageRelation = TextImageRelation.ImageBeforeText;
exitButton.Image = global::Telerik.Examples.WinControls.Properties.Resources.exitButton;
this.radRibbonBar1.StartMenuBottomStrip.Children.Add(exitButton);
this.radRibbonBar1.StartMenuBottomStrip.Children.Add(optionsButton);
this.radComboBox1.TextBoxElement.Margin = new Padding(0, 4, 0, 0);
this.radRibbonBar1.RibbonBarElement.TabStripElement.SelectedTab =
this.radRibbonBar1.RibbonBarElement.TabStripElement.Items[0];
| Private Shadows Sub ExtendedPaint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint | |
| If Not String.IsNullOrEmpty(Me._alt_text) Then '_alt_text (string property) | |
| Dim f1 As Font = New Font("Arial", 8.0F, FontStyle.Bold) | |
| Dim sf As New StringFormat() | |
| Dim brush As System.Drawing.Brush = New SolidBrush(Me._alt_text_color) | |
| Dim rect As Rectangle = New Rectangle(e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width, e.ClipRectangle.Height - 7) | |
| sf.Alignment = StringAlignment.Center | |
| sf.LineAlignment = StringAlignment.Far | |
| e.Graphics.DrawString(Me._alt_text, f1, brush, rect, sf) | |
| brush.Dispose() | |
| sf.Dispose() | |
| f1.Dispose() | |
| End If | |
| End Sub |