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.
Unfortunately, activation email could not send to your email. Please try again.

customized dropdown button

Thread ID:

Created:

Updated:

Platform:

Replies:

56474 Feb 15,2007 09:54 AM Feb 20,2007 06:42 AM Windows Forms 4
loading
Tags: Tools
Administrator [Syncfusion]
Asked On February 15, 2007 09:54 AM

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.

Golda Rebecal [Syncfusion]
Replied On February 16, 2007 05:10 AM

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

Administrator [Syncfusion]
Replied On February 18, 2007 12:01 PM

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

Administrator [Syncfusion]
Replied On February 19, 2007 08:28 AM

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

Golda Rebecal [Syncfusion]
Replied On February 20, 2007 06:42 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;