Major problems with SlideStyle
#21
Posted 29 April 2008 - 02:42 AM
I have spot 2nd bug and I am working on it. You may expect good results durring end of a day.
Best regards
--
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.
#22
Posted 29 April 2008 - 10:56 AM
this sounds good. Then I'm awaiting your solution
Regards,
Taifun
#23
Posted 30 April 2008 - 12:01 AM
First try next:
Open NxGrid.pas and replace next procedure:
var
RepaintRect: TRect;
Delta: Integer;
begin
// to-do: need rebuild
if IsUpdating then Exit;
RepaintRect := GetBodyRect;
RepaintRect.Left := 0;
if VisibleRows = 0 then
begin
RepaintRect.Top := GetRowTop(Index);
Delta := 0 - ARowHeight - GridSpace[lpTopBottom];
FFirstRow := 0;
ScrollWindowEx(Handle, 0, Delta, nil, @RepaintRect, 0, @RepaintRect, SW_INVALIDATE);
end;
if Index = FFirstRow then
begin
if Show then Delta := ARowHeight + GridSpace[lpBottom] else
begin
if not VertScrollBar.IsLast then
begin
if GetVisibleRows > 0 then
while (FFirstRow < RowCount) and not GetRowVisible(FFirstRow)
do Inc(FFirstRow);
{ Bn: If row is last, Pos will be larger than Max,
and pos will be moved and scrolled back }
end;
Delta := -(ARowHeight + GridSpace[lpTopBottom]);
end;
ScrollWindowEx(Handle, 0, Delta, nil, @RepaintRect, 0, @RepaintRect, SW_INVALIDATE);
end else if Index > FirstRow then
begin
case GridStyle of
gsReport: RepaintRect.Top := GetRowTop(Index);
gsSlides: RepaintRect.Top := GetSlideTop(Index);
end;
Delta := ARowHeight + GridSpace[lpTopBottom];
if not Show then Delta := -Delta;
ScrollWindowEx(Handle, 0, Delta, nil, @RepaintRect, 0, @RepaintRect, SW_INVALIDATE);
end else if Index < FFirstRow then
begin
{ Bn: Row is outside view, before current scroll pos }
if not VertScrollBar.IsFirst then
begin
if Show then
begin
VertScrollBar.BeginUpdate;
VertScrollBar.Next;
VertScrollBar.EndUpdate;
end else
begin
VertScrollBar.BeginUpdate;
if VertScrollBar.IsLast then VertScrollBar.Next else VertScrollBar.Prior;
VertScrollBar.EndUpdate;
end;
end else
begin
if Show then
begin
FFirstRow := Index;
Delta := ARowHeight + GridSpace[lpTopBottom];
end else Delta := -ARowHeight + GridSpace[lpTopBottom];
ScrollWindowEx(Handle, 0, Delta, nil, @RepaintRect, 0, @RepaintRect, SW_INVALIDATE);
end;
end;
UpdateVertScrollBar;
end;
I hope that 2nd bug is solved now. I will continue working.
Best regards
--
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.
#24
Posted 30 April 2008 - 09:54 AM
thanks for your effort.
It got a little better, but the selection is still corrupt.
If you set some rows to invisible and select some row or move the selection it gets drawn wrong.
Could you reproduce the first bug with my demo app?
Regards,
Taifun
#25
Posted 30 April 2008 - 03:52 PM
I am searching for first bug yet maybe I have already solve it but don't know.
I will be back in few hours.
Best regards
--
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.
#26
Posted 30 April 2008 - 06:09 PM
you should see the first bug with my demo app and my description.
The 2nd bug got better at redrawing the grid after the visibility of some rows changed, but afterwards the selection is still corrupt.
You select a row and the selection issn't drawn correctly.
Hope you find a solution
Regards,
Taifun
#27
Posted 30 April 2008 - 08:15 PM
At the moment, try to change next procedure in your demo:
var SlideColor, GridColor: TColor; SlideState: TSlideState);
begin
if Index mod 2 = 0 then
begin
SlideColor:=$00E8E8E8;
end else SlideColor := clWindow;
end;
I need to continue looking.
--
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.
#28
Posted 30 April 2008 - 10:19 PM
Please sorry for my delay, I am strugling with this bug a days. I will do my best to finish bug till tomorow. I have already re-write big part of code.
Selection drawing problem is solved definitelly
Best regards
--
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.
#29
Posted 01 May 2008 - 09:59 PM
I have upload newest release on Members Section, but no luck with scroll bug. It seems that Paint message is not triggered while key down is triggered 3 times. Maybe calling Refresh manually may help.
Other bugs are I hope solved now.
Best regards
--
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.
#30
Posted 05 May 2008 - 11:14 AM
I will install the update and report back to you.
Regards,
Taifun
#31
Posted 05 May 2008 - 12:40 PM
I installed the update and the errors (except for the scroll bug) seem to be solved. Thanks!
But I still need the property for the SlideCaption-Font. After the Update the Captions are back to gray
Regarding the scroll bug:
Refresh works, but only for my button-test, because I can't interfere when the hardware buttons on the device are pressed
Also the refresh results in flickering
Maybe calling Application.ProcessMessages at some point in NextGrid would help?!?
Regards,
Taifun
#32
Posted 05 May 2008 - 08:35 PM
Caption's color is not yet added, but I will add it as soon as possible. This will be one global property.
I am not sure that this is good for everyone, but you may try to manually add this call inside OnKeyDown procedure of TNxCustomGrid.
Best regards
--
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.
#33
Posted 06 May 2008 - 01:25 AM
In next version it will be a SlideCaptionColor property
Best regards
--
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.
#34
Posted 06 May 2008 - 12:11 PM
that's good news
Also the Application.ProcessMessages in KeyDown seems to work.
This leaves only the Event for drawing custom things on the slide
And of course the issues with the DbGrid.
Thanks and Regards,
Taifun
#35
Posted 06 May 2008 - 04:20 PM
I gave the SlideCaptionColor a thought and I think that just the color isn't enough ...
Couldn't you make a SlideCaptionFont? For example: I want the caption bold.
I know: I'm annoying
Regards,
Taifun
#36
Posted 06 May 2008 - 07:37 PM
For now we will go with SlideCaptionColor, to avoid adding bulky TFont property. Bold text for Slide Captions's look very bad at visual side If you need help with colors, maybe I can help.
Best regards
--
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.
#37
Posted 07 May 2008 - 09:58 AM
as you can see in my screenshots (in the posts above), I used the bold font and I don't think that it looks bad ... it's a title - titles are normally bold.
Regards,
Taifun
#38
Posted 07 May 2008 - 11:59 AM
Why avoid 'bulky' TFont, it's a column atribute and the number of columns is most of the time limited anyway.
If it was a cell property i'de fully agree to avoid TFont, but not for column level.
For now we will go with SlideCaptionColor, to avoid adding bulky TFont property. Bold text for Slide Captions's look very bad at visual side If you need help with colors, maybe I can help.
Best regards
#39
Posted 07 May 2008 - 08:18 PM
I may only add SlideCaptionFont for TNxCustomGridControl, but not for any column.
I hope that this is good.
Best regards
--
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users