Telerik Forums
UI for WinForms Forum
6 answers
237 views
Hi,

I don't know why my last posts has been removed. There is an issue with titles and radDock. See the code below :

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Windows.Forms;  
using Telerik.WinControls.UI;  
using Telerik.WinControls.UI.Docking;  
 
namespace radDockTest  
{  
    static class Program  
    {  
        /// <summary> 
        /// Point d'entrĂ©e principal de l'application.  
        /// </summary> 
        [STAThread]  
        static void Main()  
        {  
            Application.EnableVisualStyles();  
            Application.SetCompatibleTextRenderingDefault(false);  
            Application.Run(new MainForm());  
        }  
    }  
 
    public class ChildForm : RadForm {  
 
        public void setContent(Control control) {  
            control.Dock = DockStyle.Fill;  
            Controls.Add(control);  
        }  
    }  
 
    public partial class MainForm : RadForm {  
 
        public MainForm() {  
            InitializeComponent();  
            IsMdiContainer = true;  
            radDock.AutoDetectMdiChildren = true;  
        }  
 
        private void radButton1_Click(object sender, EventArgs e) {  
            addChildForm("One", true);  
        }  
 
        private void radButton2_Click(object sender, EventArgs e) {  
            addChildForm("Two", false);  
 
        }  
 
        void addChildForm(string title, bool one) {  
            ChildForm child = new ChildForm();  
            child.setContent(one ? (Control)new UserControl1() : (Control)new UserControl2());  
            DockWindow dockWindow = radDock.DockControl(child, DockPosition.Fill, DockType.Document);  
            dockWindow.TabStripItem.Text = title;  
        }  
    }  
    partial class MainForm {  
        /// <summary> 
        /// Required designer variable.  
        /// </summary> 
        private System.ComponentModel.IContainer components = null;  
 
        /// <summary> 
        /// Clean up any resources being used.  
        /// </summary> 
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 
        protected override void Dispose(bool disposing) {  
            if (disposing && (components != null)) {  
                components.Dispose();  
            }  
            base.Dispose(disposing);  
        }  
 
        private void InitializeComponent() {  
            this.radDock = new Telerik.WinControls.UI.Docking.RadDock();  
            this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer();  
            this.radPanel = new Telerik.WinControls.UI.RadPanel();  
            this.radButton1 = new Telerik.WinControls.UI.RadButton();  
            this.radButton2 = new Telerik.WinControls.UI.RadButton();  
            ((System.ComponentModel.ISupportInitialize)(this.radDock)).BeginInit();  
            this.radDock.SuspendLayout();  
            ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radPanel)).BeginInit();  
            this.radPanel.SuspendLayout();  
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radButton2)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();  
            this.SuspendLayout();  
            //   
            // radDock  
            //   
            this.radDock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));  
            this.radDock.Controls.Add(this.documentContainer1);  
            this.radDock.Dock = System.Windows.Forms.DockStyle.Fill;  
            this.radDock.DocumentManager.DocumentInsertOrder = Telerik.WinControls.UI.Docking.DockWindowInsertOrder.InFront;  
            this.radDock.Location = new System.Drawing.Point(0, 0);  
            thisthis.radDock.MainDocumentContainer = this.documentContainer1;  
            this.radDock.Name = "radDock";  
            this.radDock.Size = new System.Drawing.Size(284, 231);  
            this.radDock.TabIndex = 0;  
            this.radDock.TabStop = false;  
            this.radDock.Text = "radDock";  
            //   
            // documentContainer1  
            //   
            this.documentContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));  
            this.documentContainer1.Location = new System.Drawing.Point(0, 0);  
            this.documentContainer1.Name = "documentContainer1";  
            this.documentContainer1.Size = new System.Drawing.Size(284, 231);  
            this.documentContainer1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill;  
            this.documentContainer1.TabIndex = 0;  
            this.documentContainer1.TabStop = false;  
            //   
            // radPanel  
            //   
            this.radPanel.Controls.Add(this.radButton2);  
            this.radPanel.Controls.Add(this.radButton1);  
            this.radPanel.Dock = System.Windows.Forms.DockStyle.Bottom;  
            this.radPanel.Location = new System.Drawing.Point(0, 201);  
            this.radPanel.Name = "radPanel";  
            this.radPanel.Size = new System.Drawing.Size(284, 30);  
            this.radPanel.TabIndex = 1;  
            //   
            // radButton1  
            //   
            this.radButton1.AllowShowFocusCues = true;  
            this.radButton1.Location = new System.Drawing.Point(3, 3);  
            this.radButton1.Name = "radButton1";  
            this.radButton1.Size = new System.Drawing.Size(75, 23);  
            this.radButton1.TabIndex = 0;  
            this.radButton1.Text = "Form1";  
            this.radButton1.Click += new System.EventHandler(this.radButton1_Click);  
            //   
            // radButton2  
            //   
            this.radButton2.AllowShowFocusCues = true;  
            this.radButton2.Location = new System.Drawing.Point(86, 4);  
            this.radButton2.Name = "radButton2";  
            this.radButton2.Size = new System.Drawing.Size(75, 23);  
            this.radButton2.TabIndex = 1;  
            this.radButton2.Text = "Form2";  
            this.radButton2.Click += new System.EventHandler(this.radButton2_Click);  
            //   
            // MainForm  
            //   
            this.ClientSize = new System.Drawing.Size(284, 231);  
            this.Controls.Add(this.radDock);  
            this.Controls.Add(this.radPanel);  
            this.Name = "MainForm";  
            //   
            //   
            //   
            this.RootElement.ApplyShapeToControl = true;  
            ((System.ComponentModel.ISupportInitialize)(this.radDock)).EndInit();  
            this.radDock.ResumeLayout(false);  
            ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radPanel)).EndInit();  
            this.radPanel.ResumeLayout(false);  
            ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radButton2)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();  
            this.ResumeLayout(false);  
 
        }  
 
        private Telerik.WinControls.UI.Docking.RadDock radDock;  
        private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1;  
        private Telerik.WinControls.UI.RadPanel radPanel;  
        private Telerik.WinControls.UI.RadButton radButton2;  
        private Telerik.WinControls.UI.RadButton radButton1;  
    }  
 
    public partial class UserControl1 : UserControl {  
        public UserControl1() {  
            InitializeComponent();  
        }  
    }  
    partial class UserControl1 {  
        /// <summary>   
        /// Variable nĂ©cessaire au concepteur.  
        /// </summary> 
        private System.ComponentModel.IContainer components = null;  
 
        /// <summary>   
        /// Nettoyage des ressources utilisĂ©es.  
        /// </summary> 
        /// <param name="disposing">true si les ressources managĂ©es doivent Ăªtre supprimĂ©es ; sinon, false.</param> 
        protected override void Dispose(bool disposing) {  
            if (disposing && (components != null)) {  
                components.Dispose();  
            }  
            base.Dispose(disposing);  
        }  
 
        #region Code gĂ©nĂ©rĂ© par le Concepteur de composants  
 
        /// <summary>   
        /// MĂ©thode requise pour la prise en charge du concepteur - ne modifiez pas   
        /// le contenu de cette mĂ©thode avec l'Ă©diteur de code.  
        /// </summary> 
        private void InitializeComponent() {  
            this.radLabel = new Telerik.WinControls.UI.RadLabel();  
            ((System.ComponentModel.ISupportInitialize)(this.radLabel)).BeginInit();  
            this.SuspendLayout();  
            //   
            // radLabel  
            //   
            this.radLabel.AutoSize = false;  
            this.radLabel.Dock = System.Windows.Forms.DockStyle.Fill;  
            this.radLabel.Location = new System.Drawing.Point(0, 0);  
            this.radLabel.Name = "radLabel";  
            //   
            //   
            //   
            this.radLabel.RootElement.StretchHorizontally = true;  
            this.radLabel.RootElement.StretchVertically = true;  
            this.radLabel.Size = new System.Drawing.Size(150, 150);  
            this.radLabel.TabIndex = 0;  
            this.radLabel.Text = "Dock me elsewhere and the title will change. Please tell me how to keep the initi" +  
                "al one.";  
            //   
            // UserControl1  
            //   
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);  
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;  
            this.Controls.Add(this.radLabel);  
            this.Name = "UserControl1";  
            ((System.ComponentModel.ISupportInitialize)(this.radLabel)).EndInit();  
            this.ResumeLayout(false);  
 
        }  
 
        #endregion  
 
        private Telerik.WinControls.UI.RadLabel radLabel;  
    }  
 
    public partial class UserControl2 : UserControl {  
        public UserControl2() {  
            InitializeComponent();  
        }  
    }  
    partial class UserControl2 {  
        /// <summary>   
        /// Variable nĂ©cessaire au concepteur.  
        /// </summary> 
        private System.ComponentModel.IContainer components = null;  
 
        /// <summary>   
        /// Nettoyage des ressources utilisĂ©es.  
        /// </summary> 
        /// <param name="disposing">true si les ressources managĂ©es doivent Ăªtre supprimĂ©es ; sinon, false.</param> 
        protected override void Dispose(bool disposing) {  
            if (disposing && (components != null)) {  
                components.Dispose();  
            }  
            base.Dispose(disposing);  
        }  
 
        #region Code gĂ©nĂ©rĂ© par le Concepteur de composants  
 
        /// <summary>   
        /// MĂ©thode requise pour la prise en charge du concepteur - ne modifiez pas   
        /// le contenu de cette mĂ©thode avec l'Ă©diteur de code.  
        /// </summary> 
        private void InitializeComponent() {  
            this.radLabel = new Telerik.WinControls.UI.RadLabel();  
            ((System.ComponentModel.ISupportInitialize)(this.radLabel)).BeginInit();  
            this.SuspendLayout();  
            //   
            // radLabel  
            //   
            this.radLabel.AutoSize = false;  
            this.radLabel.Dock = System.Windows.Forms.DockStyle.Fill;  
            this.radLabel.Location = new System.Drawing.Point(0, 0);  
            this.radLabel.Name = "radLabel";  
            //   
            //   
            //   
            this.radLabel.RootElement.StretchHorizontally = true;  
            this.radLabel.RootElement.StretchVertically = true;  
            this.radLabel.Size = new System.Drawing.Size(218, 189);  
            this.radLabel.TabIndex = 1;  
            this.radLabel.Text = "Dock me elsewhere and the title will change. Please tell me how to keep the initi" +  
                "al one.";  
            //   
            // UserControl2  
            //   
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);  
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;  
            this.Controls.Add(this.radLabel);  
            this.Name = "UserControl2";  
            this.Size = new System.Drawing.Size(218, 189);  
            ((System.ComponentModel.ISupportInitialize)(this.radLabel)).EndInit();  
            this.ResumeLayout(false);  
 
        }  
 
        #endregion  
 
        private Telerik.WinControls.UI.RadLabel radLabel;  
    }  
 
}  
 
Nikolay
Telerik team
 answered on 16 Jun 2010
9 answers
734 views
I came across this forum post, but it wasn't too helpful setting the maximum and minimum don't seem to work quite right.  (Also the post is a little outdated)
http://www.telerik.com/community/forums/winforms/toolstrip/how-to-resize-textbox-element.aspx


I am actually trying to make the TextBoxElement smaller.  The default is about twice as wide as I would like (just want to show a page count "X of Y").  Nothing I have tried will reliably change the size of this textbox.  I can get some of it to resize, but then the hosted .NET textbox control is misaligned and so the cursor doesn't look right.  Having the TextBoxElement be this wide is ok if there is no workaround, but it takes up valuable horizontal screen real estate.

Thanks!
Adam
Martin Vasilev
Telerik team
 answered on 16 Jun 2010
7 answers
281 views
Hi,

May I know how can I distribute the Telerik Control in my project together with my installation file? I couldn't find any merge module or things like that.

Please advice.
Nikolay
Telerik team
 answered on 16 Jun 2010
1 answer
131 views

Hi,


I added a read only BindingList as a DataSource to a grid view. AllowAdd, AllowEdit, AllowRemove are all set to false and IsReadOnly is set to true. But the grid view still allows the edit of cells and adding new rows. Is this by design or do I miss any configuration!? I know that the normal Windows Forms DataGridView evaluates these flags I and thought the Telerik grid view would do the same.


Regards

Martin


Alexander
Telerik team
 answered on 16 Jun 2010
1 answer
111 views
Hello,

the project upgrade utility shows an unreadable textcolor.
The light grey backcolor and the white text color is a bad color combination.

Kind Regards,

Ramius
Stefan
Telerik team
 answered on 15 Jun 2010
3 answers
535 views
Hi

I have created a radButtonElement in a ribbonbar group.
The text of the button is "New Connection", I want this text to be on 2 lines, and want it centered.
Right now I can get the caption in 2 lines by using "<html>New<br />Connection</html>" in the property Text.
However this is always left aligned when shown in screen.
Eg. like below
<Icon>
New
Connection

How can I make New Connection centered, not default to left align?

The image attached is the rabButton in the radRibbonBar.  It is left aligned but I want it centered.
Boryana
Telerik team
 answered on 15 Jun 2010
1 answer
133 views
In a hierarchical gridview,with pinned rows,how I can enable/provide keyboard navigation in pinned rows?For now,the user can navigate to/select pinned rows only with mouse.
Jack
Telerik team
 answered on 15 Jun 2010
1 answer
177 views
Hi Telerik Team,

I am upgrading the telerik from "RadControls for WinForms Q3 2009 SP1(Version : 2009.3.9.1203)" To "RadControls for WinForms Q1 2010 SP2 (Version : 2010.1 504)"

Kindly let me know if any code changes are required to the newer version.

Reply asp.

Regards Arul
Vassil Petev
Telerik team
 answered on 15 Jun 2010
1 answer
181 views
Hi,

Might be this question is repeated but i still have a doubt.

I have 3 grids on a single WinForm.  I applied "Breeze" theme to all 3 grids. 
Now want i want to do is apply different color shade to all 3 grids on top of Breeze theme.
eg. 1st grid Blue  (which is default of Breeze theme)
      2nd grid light RED
      3rd Grid  light Green.

IF i use below code it changes color for all Grids.
HslColor baseColor = HslColor.FromArgb(255, 56, 154, 254);  
currentTheme.AddColorBlend("BaseColor", baseColor);  
currentTheme.ThemeProperties["BaseColor"] = HslColor.FromArgb(255, 204, 102, 0);  
 

Is there better way to apply different color shade to all 3 grids on top of Breeze theme  or any Alternative way to achieve the task.

Regards

Stefan
Telerik team
 answered on 15 Jun 2010
1 answer
418 views

We use Telerik and a radLabel. Can anybody tell me how I change the borderstyle to fixed 3d. The current telerik radlabel can only set the border to single, fourinner and a third one. It does not give me the opportunity of using Fixed3d

How can this be achived.

Boryana
Telerik team
 answered on 15 Jun 2010
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?