We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

customized dropdown button

Hi
1.Is there anyway I can customize the button of a ComboDropDown , e.g. using a bitmap or at least changing the color of the button.

2.how can I remove the border of the combo
thanks.

4 Replies

GR Golda Rebecal Syncfusion Team February 16, 2007 10:10 AM UTC

Hi Ryan,

1) We can customize the color of the button in ComboDropDown by deriving the ComboDropDown and DropDownButton classes and overriding the OnPaint() method.

2) We can remove the border of the ComboDropDown by setting the property Border3DStyle to Adjust.

I have created a sample as per your requirements and let me know if you need any further assistance.

Thanks for your interest in Syncfusion products.

Regards,
Golda


combodropdown1.zip


AD Administrator Syncfusion Team February 18, 2007 05:01 PM UTC

Hi Golda
Looks good.
Thanks very much for your help
ryan


>Hi Ryan,

1) We can customize the color of the button in ComboDropDown by deriving the ComboDropDown and DropDownButton classes and overriding the OnPaint() method.

2) We can remove the border of the ComboDropDown by setting the property Border3DStyle to Adjust.

I have created a sample as per your requirements and let me know if you need any further assistance.

Thanks for your interest in Syncfusion products.

Regards,
Golda


combodropdown1.zip


AD Administrator Syncfusion Team February 19, 2007 01:28 PM UTC

Hi Golda
Actually now I dont quite see how it works. It doesnt have the same interface of a regular combo.
How do I add items , ??
how do get the selected item ??
Thanks

>Hi Golda
Looks good.
Thanks very much for your help
ryan


>Hi Ryan,

1) We can customize the color of the button in ComboDropDown by deriving the ComboDropDown and DropDownButton classes and overriding the OnPaint() method.

2) We can remove the border of the ComboDropDown by setting the property Border3DStyle to Adjust.

I have created a sample as per your requirements and let me know if you need any further assistance.

Thanks for your interest in Syncfusion products.

Regards,
Golda


combodropdown1.zip


GR Golda Rebecal Syncfusion Team February 20, 2007 11:42 AM UTC

Hi Ryan,

Sorry for the inconvenience caused.

We can also change the visual style of the dropdown button by setting the style property of the dropdown button so that the drop down button would be in different color.

DropDownButton dropdownButton = this.comboDropDown1.DropDownButton
dropdownButton.Style = VisualStyle.OfficeXP

We can add items to the ComboDropDown by placing any control that helps in displaying the data appropriately in the drop down area of the ComboDropDown.

this.comboDropDown1.PopupControl = this.listBox1;

To get the selected item, we can handle the SelectedIndexChanged event of the ListBox

void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.comboDropDown1.Text = this.listBox1.SelectedItem.ToString();
this.comboDropDown1.PopupContainer.HidePopup(PopupCloseType.Done);
}

Kindly have a look at the sample attached and let me know if this meets your requirement.

Thanks for your interest in Syncfusion products.

Best Regards,
Golda


combodropdown10.zip

Loader.
Live Chat Icon For mobile
Up arrow icon