Jump to content


Photo

Major problems with SlideStyle


  • Please log in to reply
38 replies to this topic

#21 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 29 April 2008 - 02:42 AM

Hello Taifun,

I have spot 2nd bug and I am working on it. You may expect good results durring end of a day.

Best regards
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.

#22 Taifun

Taifun
  • Members
  • 27 posts

Posted 29 April 2008 - 10:56 AM

Hello Boki,

this sounds good. Then I'm awaiting your solution wink.gif

Regards,
Taifun

#23 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 April 2008 - 12:01 AM

Hello,

First try next:

Open NxGrid.pas and replace next procedure:

CODE
procedure TNextGrid.ShowRow(Index, ARowHeight: Integer; Show: Boolean);
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
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.

#24 Taifun

Taifun
  • Members
  • 27 posts

Posted 30 April 2008 - 09:54 AM

Hello Boki,

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 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 April 2008 - 03:52 PM

Hello Taifun,

I am searching for first bug yet sad.gif maybe I have already solve it but don't know.

I will be back in few hours.

Best regards
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.

#26 Taifun

Taifun
  • Members
  • 27 posts

Posted 30 April 2008 - 06:09 PM

Hello Boki,

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 smile.gif
Regards,
Taifun

#27 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 April 2008 - 08:15 PM

Hello Taifun,

At the moment, try to change next procedure in your demo:

CODE
procedure TForm1.gdAhSlideColoring(Sender: TObject; Index: Integer;
  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.
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.

#28 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 30 April 2008 - 10:19 PM

Hello Taifun,

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 smile.gif

Best regards
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.

#29 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 01 May 2008 - 09:59 PM

Hello Taifun,

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
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.

#30 Taifun

Taifun
  • Members
  • 27 posts

Posted 05 May 2008 - 11:14 AM

Hello Boki,

I will install the update and report back to you.

Regards,
Taifun

#31 Taifun

Taifun
  • Members
  • 27 posts

Posted 05 May 2008 - 12:40 PM

Hello Boki,

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 wink.gif

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 sad.gif
Also the refresh results in flickering sad.gif
Maybe calling Application.ProcessMessages at some point in NextGrid would help?!?

Regards,
Taifun

#32 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 05 May 2008 - 08:35 PM

Hello Taifun,

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
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.

#33 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 May 2008 - 01:25 AM

Hello,

In next version it will be a SlideCaptionColor property smile.gif

Best regards
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.

#34 Taifun

Taifun
  • Members
  • 27 posts

Posted 06 May 2008 - 12:11 PM

Hello Boki,

that's good news wink.gif
Also the Application.ProcessMessages in KeyDown seems to work.

This leaves only the Event for drawing custom things on the slide smile.gif
And of course the issues with the DbGrid.

Thanks and Regards,
Taifun

#35 Taifun

Taifun
  • Members
  • 27 posts

Posted 06 May 2008 - 04:20 PM

Me again.

I gave the SlideCaptionColor a thought and I think that just the color isn't enough ... wink.gif
Couldn't you make a SlideCaptionFont? For example: I want the caption bold.

I know: I'm annoying wink.gif
Regards,
Taifun

#36 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 May 2008 - 07:37 PM

Hello Taifun,

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 smile.gif If you need help with colors, maybe I can help.

Best regards
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.

#37 Taifun

Taifun
  • Members
  • 27 posts

Posted 07 May 2008 - 09:58 AM

Hello Boki,

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 wvd_vegt

wvd_vegt

    Master Member

  • Honorable Members
  • PipPipPipPipPip
  • 710 posts
  • Gender:Male
  • Location:the Netherlands

Posted 07 May 2008 - 11:59 AM

Hi Boki,

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.

QUOTE (Boki (Berg) @ May 6 2008, 08:37 PM) <{POST_SNAPBACK}>
Hello Taifun,

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 smile.gif If you need help with colors, maybe I can help.

Best regards

G.W. van der Vegt

#39 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 07 May 2008 - 08:18 PM

Hello Wim,

I may only add SlideCaptionFont for TNxCustomGridControl, but not for any column.

I hope that this is good.

Best regards
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users