public Form1() { InitializeComponent(); InplaceEditorInfo checkInfo = new InplaceEditorInfo(new RepositoryItemCheckEdit(), new Size(20, 20), true); checkInfo.MouseDown += checkInfo_MouseDown; RepositoryItemButtonEdit riBE = new RepositoryItemButtonEdit(); InplaceEditorInfo buttonInfo = new InplaceEditorInfo(riBE, new Size(30, 20), null); riBE.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; riBE.Buttons[0].Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph; riBE.Buttons[0].Caption = "Test"; riBE.AutoHeight = false; buttonInfo.MouseDown += buttonInfo_MouseDown; buttonInfo.RightIndent = 25; RepositoryItemHyperLinkEdit riHE = new RepositoryItemHyperLinkEdit(); InplaceEditorInfo hyperLinkInfo = new InplaceEditorInfo(riHE, new Size(120, 20), "http://devexpress.com/"); hyperLinkInfo.RightIndent = 60; riHE.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; hyperLinkInfo.MouseDown += new EventHandler(hyperLinkInfo_MouseDown); myLayoutControl1.TabGroupItems.Add(tabbedControlGroup1, new InplaceEditorInfo[] { checkInfo, buttonInfo, hyperLinkInfo }); InplaceEditorInfo progressBarInfo = new InplaceEditorInfo(new RepositoryItemProgressBar(), new Size(40, 20), 10); progressBarInfo.MouseDown += progressBarInfo_MouseDown; checkInfo = new InplaceEditorInfo(new RepositoryItemCheckEdit(), new Size(20, 20), true); checkInfo.MouseDown += checkInfo_MouseDown; checkInfo.RightIndent = 40; myLayoutControl1.TabGroupItems.Add(tabbedControlGroup2, new InplaceEditorInfo[] { progressBarInfo, checkInfo }); }
private bool FindEditorInfo(Point location, out TabbedGroup key, out InplaceEditorInfo resultInfo) { key = null; resultInfo = null; foreach (KeyValuePair <TabbedGroup, InplaceEditorInfo[]> pair in TabGroupItems) { foreach (InplaceEditorInfo info in pair.Value) { if (info.Bounds.Contains(location)) { key = pair.Key; resultInfo = info; return(true); } } } return(false); }
private void OnEditorClick(TabbedGroup group, InplaceEditorInfo info) { info.RaiseMouseDown(); Refresh(); }
void checkInfo_MouseDown(object sender, EventArgs e) { InplaceEditorInfo info = sender as InplaceEditorInfo; info.EditValue = true.Equals(info.EditValue) ? false : true; }
void progressBarInfo_MouseDown(object sender, EventArgs e) { InplaceEditorInfo info = sender as InplaceEditorInfo; info.EditValue = 10 + r.Next(80); }
void hyperLinkInfo_MouseDown(object sender, EventArgs e) { InplaceEditorInfo info = sender as InplaceEditorInfo; Process.Start(info.EditValue.ToString()); }