Archive: How to enable horizontal scroll of a list box?


How to enable horizontal scroll of a list box?
I have a custom page with a list box.

I define the list box with

Flags=VSCROLL|HSCROLL

I populate the list box via a

SendMessage $R0 ${LB_ADDSTRING} 0 "STR:really long .... string"

The really long string is about 200 characters wide.

The horizontal scroll of my list box appears but is grayed out. Silly question, what do I do to have the horizontal scroll work?

I must be missing something super obvious. Any help would be appreciated.

Dennis.


From the MSDN page for LB_ADDSTRING:

If the list box has WS_HSCROLL style and you add a string wider than the list box, send an LB_SETHORIZONTALEXTENT message to ensure the horizontal scrollbar appears.
Stu

Thanks Stu, that worked.

I shouldn't have asked in the NSIS forum, it was a Windows GUI quirk rather than an NSIS quirk.

I need to remember that.

Dennis.


It will still help other NSIS users.

Stu