PlanetSquires Forums

Support Forums => WinFBE - Code Editor and Visual Designer => Topic started by: SeaVipe on February 22, 2020, 08:04:54 PM

Title: WinFBE 2.0.5 - ListBox
Post by: SeaVipe on February 22, 2020, 08:04:54 PM
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.
Title: Re: WinFBE 2.0.5 - ListBox
Post by: Paul Squires on February 22, 2020, 08:24:44 PM
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.
Title: Re: WinFBE 2.0.5 - ListBox
Post by: SeaVipe on February 22, 2020, 08:35:01 PM
Perfect! Thanks, Paul.