WinFBE 2.0.5 - ListBox

Started by SeaVipe, February 22, 2020, 08:34:54 PM

Previous topic - Next topic

SeaVipe

Hi Paul, I have 2 ListBoxes on a form. The second ListBox (#2) inherits the .ItemHeight from the first ListBox (#1). #1 is set to .ItemHeight 18, #2 is set to 50. They both display with an ItemHeight of 18. Click Event on #2: ? sender.ItemHeight console prints 50. Click Event on #1: ? sender.ItemHeight console prints 18.
Clive Richey

Paul Squires

Thanks Clive - good catch. In my source code for WM_MEASUREITEM, I make the comment:

         ' WM_MEASUREITEM is sent prior to valid hWindow so we need to manually
         ' search all controls in the controls collection to get a matching CtrlID.

I did the search but forgot to test the found ListBox control against the wParam value which is the Control ID. Basically, I returned the ItemHeight for whatever the first found ListBox on the Form had. I have corrected the code and the fix will be 2.0.6.
Paul Squires
PlanetSquires Software

SeaVipe

Clive Richey