private
void InitBackgroundCombo()
{
// this returns all the color in the Color struct
Color[] systemColors = GetAllColors();
for (int i = 0; i < systemColors.Length; i++)
{
RadComboBoxItem item = new RadComboBoxItem();
item.ForeColor = systemColors[i];
item.Text = systemColors[i].Name;
item.BackColor = systemColors[i];
cbxBackground.Items.Add(item);
}
}
I'm workin with RadControls for WinForms. I have two questions about GridView.
First - how to turn off default ContextMenuStrip which appears after I click r-mouse button and hold it?
Second - I don't know if it's an error but after migration from Q2 filter text box (most right) is in front of the scrollbar (previously it wasn't)
radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();
radWaitingBar1.Location = new System.Drawing.Point(110, 38);
radWaitingBar1.Name = "radWaitingBar1";
radWaitingBar1.Size = new System.Drawing.Size(150, 15);
radWaitingBar1.TabIndex = 0;
radWaitingBar1.WaitingSpeed = 10;
radWaitingBar1.ThemeClassName = "Telerik.WinControls.UI.RadWaitingBar";
// class for handling object operations
public
class BaseRibbonObjectHandler : RadRibbonBarCommandTab
// create the chunk
m_chkPositionAndSize =
new RadRibbonBarChunk();
m_chkPositionAndSize.Orientation = System.Windows.Forms.Orientation.Vertical;
m_chkPositionAndSize.Text = "Position and Size";
// create the ribbon bar group
RadRibbonBarButtonGroup radRibbonBarButtonGroup1 = new RadRibbonBarButtonGroup();
radRibbonBarButtonGroup1.Orientation = System.Windows.Forms.Orientation.Horizontal;
radRibbonBarButtonGroup1.MinSize = new System.Drawing.Size(22, 22);
radRibbonBarButtonGroup1.ShowBorder = true;
// create the labels
RadLabelElement radLabelElement1 = new RadLabelElement();
RadLabelElement radLabelElement2 = new RadLabelElement();
radLabelElement1.Text = "Width ";
radLabelElement2.Text = "Height ";
// create the textboxes
tbSizeWidth = new RadTextBoxElement();
tbSizeWidth.MinSize = new Size(100, 0);
tbSizeWidth.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
tbSizeHeight = new RadTextBoxElement();
tbSizeHeight.MinSize = new Size(100, 0);
tbSizeHeight.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren;
// add the controls to the button group
radRibbonBarButtonGroup1.Items.AddRange(new RadItem[] { radLabelElement1, tbSizeWidth, radLabelElement2, tbSizeHeight });
// add the group to the chunk
m_chkPositionAndSize.Items.Add(radRibbonBarButtonGroup1);
// add the chunks to the control
this.Items.Add(m_chkPositionAndSize);