Jump to content


Photo

NxDBComboBoxColumn6 popup drawn in wrong position


  • Please log in to reply
3 replies to this topic

#1 PhilW2

PhilW2
  • Members
  • 10 posts

Posted 21 December 2020 - 08:21 PM

Hello Boki,
 
I'm sorry to report another bug, but at least this time I have an idea how it's caused.  It is in the NxDBComboBoxColumn6 class, and relates to the position on the screen of the cell dropdown. 
 
When the combobox dropdown is activated by clicking with the mouse, the position of the dropdown is correct, however, when activated by the keyboard, the dropdown is drawn in the top left hand corner of the grid.
 
 
It would appear that the dropdown is drawn with respect to the parent control - the DBGrid, rather than the cell in the NxDBComboBoxColumn.
 
Debugging took me to line 4098 of NxEdit6.pas, the TNxDropDownEdit6.Dropdown procedure:
 
    case PopupAnchor of
      paLeft: ScreenPoint := Parent.ClientToScreen(Point(BoundsRect.Left, BoundsRect.Bottom));
      paRight: ScreenPoint := Parent.ClientToScreen(Point(BoundsRect.Right, BoundsRect.Bottom));
    end;
 
And the issue is in the values of the BoundsRect instance. When activated by the mouse, and the dropdown is correctly positioned, typical values of the BoundsRect are left of 431 and Bottom of 59.  However when activated by the keyboard the values are left of 0 and bottom of 21 (also top = 0 and right = 121).
 
Attached File  TNxDropDownEdit6_DropDown.png   32.99KB   0 downloads
 
It would seem that the BoundsRect is of the NxComboBox6 inplace control; not of the NextDBGrid6 control.
 
I hope this information provides some help for you,
Kind regards
PhilW.


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 21 December 2020 - 09:12 PM

Thank you Phil.

 

Your insight will help. I will try to have it ready for upcoming update.


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.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 27 December 2020 - 06:34 PM

Hi Phil,

 

I'm back. For some reason it seems to work well for me. I'm using Alt+Key down to open the list and it's open where it should.

 

Can you tell me which version of the suite you use? There is a small chance that I already fixed it before.


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.

#4 PhilW2

PhilW2
  • Members
  • 10 posts

Posted 05 January 2021 - 06:05 PM

Hello Boki,

 

It is the current version, v6.6.0.   I didn't know about the hot key combination Alt+AnyKey to dropdown the combobox. It does not dropdown the combobox list for me, either with the AutoDropdown property true or false. Are you thinking of other control, rather than the NxDBComboboxColumn6 control?

 

In the Next Suite v5 any key would dropdown the combobox list - we suggest to our users that they use the spacebar - then with the up and down arrows they can enter and edit information using just the keyboard.

 

This issue may seem a trivial bug, but for users in an office environment, with routine data entry tasks, the ability to use the data grids with the keyboard only (rather than the very slow alternative of keyboard and mouse) is essential. 

 

One other small point: the ListWidth property is ignored when the dropdown list is triggered by the mouse; but it is recognized when the dropdown list is triggered by the keyboard. This may help you in understanding where the code between the two trigger methods diverge. 

 

Best wishes for the new year,

PhilW.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users