Posted on Nov 27, 2011 (permalink)
Reply
Posted on Nov 30, 2011 (permalink)
To focus a child control in ToolWindow or any parent window, you must call Focus method in the Load event. Here is a simple example:
public
partial
class
DockForm5 : Form
{
private
TextBox textBox;
DockForm5()
InitializeComponent();
ToolWindow tool =
new
ToolWindow(
"123"
);
ComboBox box =
ComboBox();
box.Items.Add(
"1"
"2"
"3"
tool.Controls.Add(box);
RadDropDownList list =
RadDropDownList();
list.Items.Add(
list.Location =
Point(50, 50);
tool.Controls.Add(list);
RadDateTimePicker picker =
RadDateTimePicker();
picker.Location =
Point(50, 90);
tool.Controls.Add(picker);
radDock1.DockWindow(tool, DockPosition.Left);
tool =
"333"
textBox =
TextBox();
tool.Controls.Add(textBox);
radDock1.DockWindow(tool, DockPosition.Bottom);
radDock1.AddDocument(
DocumentWindow(
"test"
));
}
protected
override
void
OnLoad(EventArgs e)
base
.OnLoad(e);
textBox.Focus();
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Posted on Dec 3, 2011 (permalink)
Posted on Dec 7, 2011 (permalink)
For this functionality you can use the Shown event of From instead of the Load event. Here is a simple example:
OnShown(EventArgs e)
.OnShown(e);
radDock1.FloatWindow(toolWindow);
toolWindow.FloatingParent.Activate();
Back to Top
[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]
UI controls for ASP.NET AJAX, MVC, WPF, Silverlight, Windows Forms and Windows Phone. Visual Studio productivity tools. Reporting and data layer solutions.
HTML5 / JavaScript tools for Web and Mobile applications
Functional, Performance, Load and Mobile Software Testing
CMS, Mobile Web, Ecommerce, Emarketing, Social Media
Project management software inspired by Agile best practices
It seems you haven't bookmarked any pages. Fix that by clicking the button below