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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to specify the text alignment of the ComboBoxBarItem?

Platform: WinForms |
Control: XPToolbar |
Published Date: July 16, 2015 |
Last Revised Date: July 16, 2015

The cursor position of the ComboBoxBarItem is the same on its lost focus, by default. Like the ComboBox, the cursor position of the ComboBoxBarItem can be aligned to the left by handling its events, TextBoxBound, MouseUp, and LostFocus.

 

TextBoxBound:

This event is raised when TextBox bounds in the ComboBarItem is set. By handling this event, you can access its inner TextBox.

MouseUp:

This event is raised once Mouse selection occurs in the ComboBarItem. By handling this event, you can update the cursor position upon selection.

LostFocus:

This event is raised when the ComboBarItem focus is lost. By handling this event, you can update its cursor position once the focus in lost.

The following code example demonstrates the same.

C#

 

VB

 

 

Figure 1: ComboBoxBarItem focused on its item selection

 

Figure 2: ComboBoxBarItem text is left aligned on its focus lost

 

Sample Links:

C#: http://www.syncfusion.com/downloads/support/directtrac/141232/ze/ComboBoxJustify-897526030

VB: http://www.syncfusion.com/downloads/support/directtrac/141232/ze/ComboBoxJustify_VB-574148021

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon