Hi,
I found the following NextGrid misbehavior on latest version of components:
1. I have a grid with 10 rows.
2. To speed up the design I copy/paste one existing table and modified some of the columns (also added and removed columns).
3. During design time I make the form long (10 and 1/2 rows) and wide enough to avoid scroll bars. During Form creation I add 10 rows.
4. When the program runs I see that the Scroll bars appeared despite that there is no need from Scroll bars
I found that if I design the table with 10 and 1/2 rows the problem appears - see images below:
Grid 10 and half rows.png 3.35KB
1 downloads
scroll bars 10 and half.png 6.34KB
1 downloads
When I make the grid to be 11 and something rows (a little more than 11 rows exactly) - everything is OK.
grid 11 rows.png 4.74KB
0 downloads
display 11 rows - last row empty.png 3.26KB
0 downloads
You can see how the last line is dark just because I added 10 rows and the space is for 11 rows.
It's strange that if I delete the whole table and redesign it from scratch the problem disappears.
Is there a way to suppress the scroll bars completely?
Best regards,
Luben
NextGrid scroll bars misbehavior
Started by Luben, Dec 17 2012 11:05 AM
4 replies to this topic
#1
Posted 17 December 2012 - 11:05 AM
#2
Posted 18 December 2012 - 05:32 AM
Hello Luben,
I think that you need to set DoubleBuffered of grid to False, or for parent control (containing grid).
I think that you need to set DoubleBuffered of grid to False, or for parent control (containing grid).
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.
--
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
Posted 18 December 2012 - 02:37 PM
Hi Boki,
The grid is placed on TFrame, DoubleBuffered was set to False both to frame and the grid.
It looks like there is some hidden, private variable that holds the memory of this misbehavior - once the grid "switches" in this mode there is no way to return it back. The solution is - delete the grid and redesign it from scratch. I'll try to gather more information how and when the problem appears.
BTW, I always keep doubleBuffered to False, setting it to True yields multiple problems
Best regards,
Luben
PS
I found that setting HideScrollBars to False hides the horizontal bar
1. HideScrollBar = False
With hideScrollBars.png 4.04KB 0 downloads
2. HideScrollBar = True
HideScrollBars to True.png 5.43KB 0 downloads
The grid is placed on TFrame, DoubleBuffered was set to False both to frame and the grid.
It looks like there is some hidden, private variable that holds the memory of this misbehavior - once the grid "switches" in this mode there is no way to return it back. The solution is - delete the grid and redesign it from scratch. I'll try to gather more information how and when the problem appears.
BTW, I always keep doubleBuffered to False, setting it to True yields multiple problems
Best regards,
Luben
PS
I found that setting HideScrollBars to False hides the horizontal bar
1. HideScrollBar = False
With hideScrollBars.png 4.04KB 0 downloads
2. HideScrollBar = True
HideScrollBars to True.png 5.43KB 0 downloads
#4
Posted 18 December 2012 - 06:04 PM
Hi Boki,
I found something bizarre - I managed to fix the problem but I feel that something is wrong. In short:
1. I have a main form with multiple tabs (NxPageControl)
2. I have multiple frames, each frame is used only once in the main form. There are multiple components on each frame, including NextGrid tables
3. In the frame where the problem grid resides there are several NextGrid, only one is misbehaving.
4. I found that if I delete all columns in the problem grid on the main form (but not touching the columns in the frame) the problem disappears.
In short - if I delete the columns in the frame implementation (frame placed on the form) the grid is OK.
BTW I found before that if I delete / add NextGrid columns in the main form (but not touching the frames) sometimes the column description remains in the class declarations. The result is - when you add in the form or in the frame a column and if by accident it has the same name as the remained one an error message pops up. The solution is to manually delete this column.
I guess it's something connected with the frames
Best regards,
Luben
I found something bizarre - I managed to fix the problem but I feel that something is wrong. In short:
1. I have a main form with multiple tabs (NxPageControl)
2. I have multiple frames, each frame is used only once in the main form. There are multiple components on each frame, including NextGrid tables
3. In the frame where the problem grid resides there are several NextGrid, only one is misbehaving.
4. I found that if I delete all columns in the problem grid on the main form (but not touching the columns in the frame) the problem disappears.
In short - if I delete the columns in the frame implementation (frame placed on the form) the grid is OK.
BTW I found before that if I delete / add NextGrid columns in the main form (but not touching the frames) sometimes the column description remains in the class declarations. The result is - when you add in the form or in the frame a column and if by accident it has the same name as the remained one an error message pops up. The solution is to manually delete this column.
I guess it's something connected with the frames
Best regards,
Luben
#5
Posted 20 December 2012 - 11:05 PM
Hi Boki,
I think that I located the problem - it's something wrong happening during the NextGrid initialization (Create) in Frames. The following facts confirm my observation:
1. Frames don't have OnCreate event, it should be artificially made by overriding manually the constructor Create
2. In the Frame OnCreate (see 1) procedure if I add rows in NextGrid the scroll bars appear (manifestation of the problem)
3. If in the main form where the frame was placed I manually Reset the NextGrid (NextGrid.ClearRows) and add the rows - everything becomes alright - see the attached video below
Scroll Bars.wmv 245.23KB 2 downloads
In short - if the grid was initialized in the main form (not in the frame) - the problem is not there.
Best regards,
Luben
I think that I located the problem - it's something wrong happening during the NextGrid initialization (Create) in Frames. The following facts confirm my observation:
1. Frames don't have OnCreate event, it should be artificially made by overriding manually the constructor Create
2. In the Frame OnCreate (see 1) procedure if I add rows in NextGrid the scroll bars appear (manifestation of the problem)
3. If in the main form where the frame was placed I manually Reset the NextGrid (NextGrid.ClearRows) and add the rows - everything becomes alright - see the attached video below
Scroll Bars.wmv 245.23KB 2 downloads
In short - if the grid was initialized in the main form (not in the frame) - the problem is not there.
Best regards,
Luben
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users