PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Change Combobox scrollbar width ?

Reply

Change Combobox scrollbar width ?

 
Thread Tools Rate Thread
Old 14-04-2008, 02:24 PM   #1
Sagaert Johan
Guest
 
Posts: n/a
Default Change Combobox scrollbar width ?


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




  Reply With Quote
Old 14-04-2008, 02:48 PM   #2
dbgrick
Guest
 
Posts: n/a
Default RE: Change Combobox scrollbar width ?

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.


"Sagaert Johan" wrote:

> 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
>
>
>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off