Jump to content


PhilW2

Member Since 17 Oct 2018
Offline Last Active Aug 03 2021 02:30 PM
-----

Topics I've Started

NxDBComboBoxColumn6 popup drawn in wrong position

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.

v5 equivalent events/methods in NextDBGrid6?

11 December 2020 - 06:25 PM

Hi Everyone,

 

Can anyone tell me the equivalent in the NextDBGrid 6 of the following:

 

* event OnApplyCell  ?

 

* method RefreshColumn  ?

 

that existed in the v5 component?

 

Thanks in anticipation,

PhilW.