PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WinFBE 2.0.5 - ListBox  (Read 157 times)

SeaVipe

  • Senior Member
  • ***
  • Posts: 355
  • Windows 10
WinFBE 2.0.5 - ListBox
« 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.
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 9202
  • Windows 10
    • PlanetSquires Software
Re: WinFBE 2.0.5 - ListBox
« Reply #1 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.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

SeaVipe

  • Senior Member
  • ***
  • Posts: 355
  • Windows 10
Re: WinFBE 2.0.5 - ListBox
« Reply #2 on: February 22, 2020, 08:35:01 PM »

Perfect! Thanks, Paul.
Logged
Clive Richey
*“You Either Have To Be Part Of The Solution, Or You’re Going To Be Part The Problem.” Eldridge Cleaver.
#StaySafe, Always  Keep A Safe #SocialDistance, #WashYourHands Often and please, #StayHome!