public Form1()
{
InitializeComponent();
RadSplitButtonElement btnAttachFileDocument;
btnAttachFileDocument = new RadSplitButtonElement();
btnAttachFileDocument.Text = "Attach File";
btnAttachFileDocument.Click += new EventHandler(btnAttachFileDocument_Click);
btnAttachFileDocument.DropDownOpened += new EventHandler(btnAttachFileDocument_DropDownOpened);
RadLabelElement oMenuItem;
oMenuItem = new RadLabelElement();
oMenuItem.Text = "Cover Sheet";
oMenuItem.Click += new EventHandler(oMenuItem_Click);
btnAttachFileDocument.Items.Add(oMenuItem);
oMenuItem = new RadLabelElement();
oMenuItem.Text = "Master Waybill Doc";
btnAttachFileDocument.Items.Add(oMenuItem);
radRibbonBar1.CommandTabs[0].Items.Add(btnAttachFileDocument);
}
void oMenuItem_Click(object sender, EventArgs e)
{
this.Text = "Cover Sheet Clicked";
}
void btnAttachFileDocument_DropDownOpened(object sender, EventArgs e)
{
this.Text = "DropDown";
}
void btnAttachFileDocument_Click(object sender, EventArgs e)
{
this.Text = "Clicked";
}
I have 2 issues .
Firstly I cannot get a seperate event when clicking the dropdown arrow of the button or when clicking the button itself.
I want to generate a default click event if the user clicks the button but if he opens the drop down I want to wait for him
to select the appropriate item from the list. At the moment I always get the click event when the dropdown opens. How
do I prevent this ?
Secondly , with the splitbutton control I can mouseover the dropdown arrow and button seperately and it highlights them
seperately . WIth the splitbuttonelement that I add to the ribbonbar however it always highlights it all as one control always
and I can only ever see the Image regardless of the textimage relation I setup . My text is always invisible ...