Hi Boki,
the same problem as described here http://www.bergsoft....?showtopic=1310
exists for the Grid itself. I added a handling for KeyDown and those keys which are no shortcuts for other components on the same form are accepted, others aren't!
- Bergsoft Forum
- → Viewing Profile: Topics: downwards1
Community Stats
- Group Members
- Active Posts 57
- Profile Views 7,177
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
0
Neutral
User Tools
Topics I've Started
Same problem...
23 April 2007 - 10:13 PM
NxCombobox OnChange does not fire in case...
11 April 2007 - 09:59 PM
...you assign an ItemIndex and the string of this item is the same as the string of an item with another index.
E.g. 5 items in the combo wherby 2 are identical:
[0]Bird
[1]Cow
[2]Cow
[3]Horse
[4]Dog
do the following in this order:
ItemIndex := 0; //fires
ItemIndex := 2; //fires
ItemIndex := 3; //fires
ItemIndex := 2; //fires
ItemIndex := 1; //does not fire!!!
ItemIndex := 2; //does not fire!!!
ItemIndex := 1; //does not fire!!!
ItemIndex := 2; //does not fire!!!
ItemIndex := 3; //fires
ItemIndex := 1; //fires
Workaround: I have to set ItemIndex := -1 and then to the final index.
BR
DW
By the way: the combobox shows a cursor even if its style is dsdropdownlist. ->
E.g. 5 items in the combo wherby 2 are identical:
[0]Bird
[1]Cow
[2]Cow
[3]Horse
[4]Dog
do the following in this order:
ItemIndex := 0; //fires
ItemIndex := 2; //fires
ItemIndex := 3; //fires
ItemIndex := 2; //fires
ItemIndex := 1; //does not fire!!!
ItemIndex := 2; //does not fire!!!
ItemIndex := 1; //does not fire!!!
ItemIndex := 2; //does not fire!!!
ItemIndex := 3; //fires
ItemIndex := 1; //fires
Workaround: I have to set ItemIndex := -1 and then to the final index.
BR
DW
By the way: the combobox shows a cursor even if its style is dsdropdownlist. ->
NxEdit problem
11 April 2007 - 09:26 PM
Hi Boki,
if I have an NxEdit on the form and there are other components with shortcuts as for example a checkbox with caption "&Save On Exit" where the "S" represents the shortcut and I am not able to enter an "s" into NxEdit. So if you have 10 more components on the same form with 10 different shortcuts, you can't enter a set of 10 characters into NxEdit!! You click into NxEdit, press "s" and it does not appear - instead the checkbox toggles its checkmark. As a test a put a standard edit onto the same form and it works without problems. This is really critical because you can't use the app anymore!
Has installed nextgrids 3.9.8b with Delphi7.
BR
DW
if I have an NxEdit on the form and there are other components with shortcuts as for example a checkbox with caption "&Save On Exit" where the "S" represents the shortcut and I am not able to enter an "s" into NxEdit. So if you have 10 more components on the same form with 10 different shortcuts, you can't enter a set of 10 characters into NxEdit!! You click into NxEdit, press "s" and it does not appear - instead the checkbox toggles its checkmark. As a test a put a standard edit onto the same form and it works without problems. This is really critical because you can't use the app anymore!
Has installed nextgrids 3.9.8b with Delphi7.
BR
DW
Assigning the selected row
01 April 2007 - 11:08 PM
Hi,
one problem solved, the next one is knocking on my door...
If I assign an index to NextGrid.SelectedRow, it is still -1 afterwards if I read the property. I did called NoSelection before the assignment.
Another problem is that if I assign NextGrid.Selected[i] := True, the NextGrid.SelectedRow is also still -1 afterwards.
What is the exact difference between Selected[i] and SelectedRow and why I cannot assign values properly?
The origin of the problem is:
I made the experience (in previous grid versions) that the selection or focus of the rows is not painted properly in some cases (if grid looses focus and gets it back and you click on some other row the previous selection is still there - as far as I can remember). That is why I used a trick. Into the GridCellSelect I put two lines:
Grid.NoSelecton;
Grid.Selected[i] := ARow;
...and painting problems where gone.
With the latest NextGrid it doesn't work properly (I recognized it with the latest, maybe it was already there in earlier versions).
However, with these two lines in the code, you can't click into the grid and press e.g. key down. Because you check for the VK_DOWN key and then you call
GetCellRect(SelectedColumn, SelectedRow).Bottom
in NxCustomGridControl (procedure MoveSelectionDown)
whereby the SelectedRow of -1 leads to an exception (out of bounds blabla).
Update: well, I just tried to remove "the trick" but without these two lines of code, the painting bug still appears. It is stupid.
BR
DW
one problem solved, the next one is knocking on my door...
If I assign an index to NextGrid.SelectedRow, it is still -1 afterwards if I read the property. I did called NoSelection before the assignment.
Another problem is that if I assign NextGrid.Selected[i] := True, the NextGrid.SelectedRow is also still -1 afterwards.
What is the exact difference between Selected[i] and SelectedRow and why I cannot assign values properly?
The origin of the problem is:
I made the experience (in previous grid versions) that the selection or focus of the rows is not painted properly in some cases (if grid looses focus and gets it back and you click on some other row the previous selection is still there - as far as I can remember). That is why I used a trick. Into the GridCellSelect I put two lines:
Grid.NoSelecton;
Grid.Selected[i] := ARow;
...and painting problems where gone.
With the latest NextGrid it doesn't work properly (I recognized it with the latest, maybe it was already there in earlier versions).
However, with these two lines in the code, you can't click into the grid and press e.g. key down. Because you check for the VK_DOWN key and then you call
GetCellRect(SelectedColumn, SelectedRow).Bottom
in NxCustomGridControl (procedure MoveSelectionDown)
whereby the SelectedRow of -1 leads to an exception (out of bounds blabla).
Update: well, I just tried to remove "the trick" but without these two lines of code, the painting bug still appears. It is stupid.
BR
DW
Problem with coordinates
28 March 2007 - 09:59 PM
Hi Boki,
It seems that there is a stupid bug which happens on approx. 1 out of 10 PCs. I cannot reproduce it on my PCs because it doesn't happen on mine (but on some user PCs). I have a grid containing some buttons in a few cells. These buttons are no real buttons, they're pictures of buttons but they look like real buttons. However, because they shall act like real buttons I am using the OnMouseUp of the grid event to detect a click on such a button (OnCellSelect fires on mouse down). Well, then I check the coordinates which I get through OnMouseUp to determine the cell (-> the button) which was clicked to initiate e.g. a download (they are download buttons...).
On some user PCs the buttons did not work. Instead of downloading my app did something different - as if the user had clicked further left onto another cell. I put some message dialogs (showing the coordinates of the click) in my app to let the users test it and send my a screenshot. I can see that on a few PCs the X coordinate is wrong (much to low).
1) How can that happen?
2) If it can't be solved, do you have any other idea how I can make a workaround. (need to trigger the mouseUp and I need to know the cell).
Well, at the time I was writing this, I thought I can maybe remember the cell via the OnCellSelect and use this info finally at the OnMouseUp. That should work - I'll try it.
BR
DW
It seems that there is a stupid bug which happens on approx. 1 out of 10 PCs. I cannot reproduce it on my PCs because it doesn't happen on mine (but on some user PCs). I have a grid containing some buttons in a few cells. These buttons are no real buttons, they're pictures of buttons but they look like real buttons. However, because they shall act like real buttons I am using the OnMouseUp of the grid event to detect a click on such a button (OnCellSelect fires on mouse down). Well, then I check the coordinates which I get through OnMouseUp to determine the cell (-> the button) which was clicked to initiate e.g. a download (they are download buttons...).
On some user PCs the buttons did not work. Instead of downloading my app did something different - as if the user had clicked further left onto another cell. I put some message dialogs (showing the coordinates of the click) in my app to let the users test it and send my a screenshot. I can see that on a few PCs the X coordinate is wrong (much to low).
1) How can that happen?
2) If it can't be solved, do you have any other idea how I can make a workaround. (need to trigger the mouseUp and I need to know the cell).
Well, at the time I was writing this, I thought I can maybe remember the cell via the OnCellSelect and use this info finally at the OnMouseUp. That should work - I'll try it.
BR
DW
- Bergsoft Forum
- → Viewing Profile: Topics: downwards1
- Privacy Policy



Find content