dennisb555
21st August 2007 08:01 UTC
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.
Afrow UK
21st August 2007 12:27 UTC
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
dennisb555
22nd August 2007 03:24 UTC
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.
Afrow UK
22nd August 2007 18:34 UTC
It will still help other NSIS users.
Stu