Jump to content


Photo

Problem with ComboBox


  • Please log in to reply
21 replies to this topic

#1 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 21 December 2005 - 07:26 PM

Hello Boki,

when I create a combobox item in a TNextInspector I can't use the scrollbar of the dropdown-list. Every time I click the arrows or try to drag the handle the combobox closes as I had clicked outside the list.

What can I do?

Perhaps this information might help: Whenever the mouse cursor is over the scrollbar the caret of the input field stops to blink. At all other positions (anywhere on the screen or in the dropdown-list) it blinks again.


Regards,
Daniel

#2 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 26 December 2005 - 03:34 AM

Doesn't anyone else have this problem?

#3 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 29 December 2005 - 08:50 PM

Shell I provide a demo application?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 29 December 2005 - 10:07 PM

Hello Daniel,

Please sorry for delay, I will check for this problem and this will be fixed in next v3.3.4

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 01 January 2006 - 03:54 PM

Hello Boki,

if you find a solution, please post it here ASAP smile.gif (Unless you plan to release the new version in the next days) My program is pretty useless without a (working) inspector component. :cry:

Regards,
Daniel

#6 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 06 January 2006 - 07:24 PM

Any news?

#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 06 January 2006 - 07:48 PM

Hello,

New v3.3.4 will be released on January 10. I am full speed working on it.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#8 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 13 January 2006 - 02:45 PM

Hello Boki,

from where can I download the new version?

Regards,
Daniel

#9 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 13 January 2006 - 03:15 PM

Hello,

New version is out in 2 days, defintely, but I still can't produce your bug. Can you please compile one small exe demo and send it to me inside zip archive to my mail.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#10 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 13 January 2006 - 07:34 PM

Done.

#11 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 20 January 2006 - 01:48 AM

Hello Boki,

since 3.3.4 has the same problem I made a little investigation of my own. Here some things I've noticed. I've used the TNxComboBox, since it has exactly the same problem.

In TNxPopupControl.MouseUp the line

CODE
if PtInRect(ClientRect, Point(X, Y)) then AcquireValue(X, Y)

 else if DropMode = dmOpen then ClosePopup;

is always wrong when I click on the scrollbar, because ...
ClientWidth = 100
Width = 121 (because of the scrollbar which normally counts as non-client)
so the popup gets closed every time I click on the scrollbar, but I think that's how it should be, since the scrollbars are outside of the client area. I wonder how this code could ever work on other systems.

Anyway, if I change this code to respect the total width of the control the popup get's still closed, but additionally the items gets selected. (As I had clicked on the item to the left of the cursor) There seem to be further width vs. client-width conflicts.


Additionally, I detected why the combobox caret stops blinking while the cursor is hovering over the scrollbar: For an unknown reason the CMMouseEnter and CMMouseLeave events are called alternating and very fast during that time.
It seems almost that CMMouseEnter triggers the call of CMMouseLeave and vice versa. (I added a beep-call in CMMouseLeave and holding the cursor over the scrollbar for just a second has caused so many beeps my system froze for about 10 seconds smile.gif )

Hope that helps.


Regards,
Daniel

#12 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 27 January 2006 - 03:49 PM

Hello Boki,

After further investigation, it seems that the continuous SetCapture - ReleaseCapture calls are the problem, not any (client)width miscalculations.
Perhaps my Delphi installation is flawed or it's some other way my fault.

Anyhow, do you see any way to solve this problem?

Regards,
Daniel

#13 hpoulsen47

hpoulsen47
  • Members
  • 2 posts

Posted 30 January 2006 - 05:51 PM

I have the same problem with scrollbars in comboboxItems in NextInspector, but only when I use NextInspector under Delphi2006.

So when will there be an official release of NextInspector for Delphi 2006

I have just updatet from 3.3.3 to 3.3.4 but the problem it still there

Henrik.

#14 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 31 January 2006 - 08:44 PM

Yes, now I am convinced, that this problem relates to Delphi 2006.

It seems that OnMouseLeave is fired, as soon as the cursor leaves the client area.
But OnMouseEnter is fired, as soon as the cursor enters the bounding area.

In earlier version, always the the bounding area was taken into account.

I guess the only solution would be using WM_ACTIVATE, but that would require wrapping the drop-down list and the edit field into a single control, otherwise the edit field cannot be focused while working with the list without either one receiving a "deactivate" message.

Regards,
Daniel

#15 bwells2004

bwells2004
  • Members
  • 1 posts

Posted 21 March 2006 - 11:43 PM

Is there a quick fix for this issue? I'm dead in the water without it. Can someone please help.

#16 Markus

Markus
  • Members
  • 54 posts

Posted 22 March 2006 - 01:06 AM

Did you try changing
CODE
if DropMode = dmOpen then SetCapture(Handle);

to
CODE
if DropMode = dmOpen then SetCaptureControl(Self);

in TNxPopupControl.CMMouseLeave?

Delphi applications/components should use SetCaptureControl() instead of SetCapture(). I'm wondering why their usage is mixed in NxInspector...

PS: The Scrollbar is drawn in WMNCPaint(), so it shouldn't belong to the component's client rect (no matter what Delphi version you're using).

#17 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 23 March 2006 - 07:01 PM

QUOTE
Did you try changing

Yes, it didn't make a difference.


QUOTE
so it shouldn't belong to the component's client rect


Did I say anything different?

Anyway, that's exactly the problem. In D2006 CMMouseLeave gets called if the cursor leaves the client area. If you click on the scrollbar the list handles the mouse message, since all mouse messages are captured and the click message never reaches the scrollbar.

The list calculates that the click position is outside its client area and closes the popup. Since it assumes that any click outside the client area is either handled by the scrollbar or occours from a click anywhere on the screen.

But since mouse message capturing already starts when the cursor is over the scrollbar, the scrollbar can never process the click message and instead the list control assumes the user has clicked elsewhere on the screen.


Regards,
Daniel

#18 abraham_ll

abraham_ll
  • Members
  • 30 posts

Posted 26 March 2006 - 09:43 PM

I have exactly the same problem.
Any fixes?
Abraham

#19 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 27 March 2006 - 11:32 PM

Hello,

I am working on it. I will put one {$IFDEF} for Delphi 2006 version.

regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#20 daniel_r

daniel_r
  • Members
  • 29 posts

Posted 10 May 2006 - 05:57 PM

Hello Boki,

sorry if I'm nagging, but is there any hope, that comboboxes in D2006 will work again soon?

Regards,
Daniel




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users