Change Combobox scrollbar width ?

S

Sagaert Johan

Hi

Is there some way to change the scrollbar width of the combobox ?
I done this before on the full framework by changing the display
properties, but on my CE5 device i can't find this.
Overriding the combobox does not expose its scrollbar, so am stuck (except
creating a now one from scratch)

Johan
 
D

dbgrick

Send the native message to the combo box:

const int CB_SETDROPPEDWIDTH = 0x0160;

/// <summary>
/// API P-Invoke used for sending a message to message pump
/// </summary>
[DllImport("coredll.dll", EntryPoint = "SendMessage")]
private static extern IntPtr SendMessageCE(IntPtr hWnd, int msg, int wParam,
int lParam);

In you Form:

SendMessage(base.Handle, CB_SETDROPPEDWIDTH, dropDownWidth, 0);

where dropDownWidth is an integer value for width in pixels.


Regards,
Rick D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top