Jump to content


Photo

NextGrid6 string processing, NextVirtualGrid6 and a few questions and bugs


  • Please log in to reply
45 replies to this topic

#21 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 01 December 2015 - 09:42 PM

Hi Karl,

Sorry for small delay, I am having a little cold now :)

If you want to get the largest cell, for example when loading you can use Canvas.GetTextWidth

In your example you need to set grid.Col[i].width := myaaray[i]
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 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 01 December 2015 - 10:04 PM

Thanks Boki,

 

no problem :)

 

I already figured this out, please see the questions in my previous post.

 

I wan't to know how to iterate over the Columns in the grid, and how to set the row-height manually.



#23 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 01 December 2015 - 11:17 PM

Hi Karl,

 

To iterate trough columns simply use

 

NextGrid.Columns[x].Property

 

In VirtualNextGrid you don't store RowHeight for each Row (as you can do for NextGrid). I will now add OnGetRowHeight event which will be called for this purpose. You can set RowHeight property of Grid to ALL rows too.


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 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 01 December 2015 - 11:40 PM

Yay :), 4000 Rows added and fitted in 4 milliseconds.

 

Thanks Boki.



#25 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 02 December 2015 - 01:25 AM

Great :)

 

I will add for tomorrow OnGetRowHeight, and also forgot to add OnHeaderClick


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 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 02 December 2015 - 02:09 AM

I appreciate it.

 

Just one more thing (sorry, it seems I'm never running out of questions :) ) :

 

Sometimes after using formScaleBy() grid.Canvas doesn't seem to get updated (it only happens if I shrink the form)

 

and so RowWidth and ColHeight values are wrong.

 

Is there a way to force it to update?



#27 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 02 December 2015 - 03:13 AM

Hi Karl,

 

Hm, not sure why it happens. You can call Invalidate, but maybe is not needed. If you can build another demo, I can take a look.


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 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 02 December 2015 - 03:21 AM

Thank's Boki,

 

I'm going to do that.



#29 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 02 December 2015 - 03:50 AM

Attached File  VirtualGrid_newDemo.zip   54KB   11 downloads

 

That's my new demo project, I hope you can find out something :)

 

 

Thank's again for all your effort.



#30 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 03 December 2015 - 01:06 AM

Solved it,

 

apparently one can't rely on canvas.TextWidth after using formScaleby(), I now use a different approach.



#31 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 03 December 2015 - 02:04 AM

Hi Boki,

 

I just realized that setting the row height manually:            NextVirtualGrid61.RowHeight := solmeValue;

 

Has no effect (didn't realize it before becouse I was using bestFitRow() ).

 

Could you please fix this.

 

Thanks, Karl.



#32 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 December 2015 - 02:44 AM

Hi Karl,

 

Sorry for delay, I was resting little bit today. I have started with OnRowHeight event. Glad you have solved Canvas problem.

 

RowHeight should set height for all rows in VirtualNextGrid. In "standard" NextGrid (without Virtual) you set RowHeight as default for new rows only (old rows have .Height property: NextGrid61.Row[x].RowHeight := xy; )


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 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 03 December 2015 - 03:03 AM

Thanks Boki,

 

No problem, everyone needs some rest from time to time :)

 

Yes, but it's not working. Setting RowHeight property for allRows doesn't do anything.

 

But this works:

 

      for I := 0 to RowCount-1 do
        Row[i].Height := someValue;



#34 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 December 2015 - 05:26 PM

Hi Karl,

 

Is this is for TNextGrid6 or TVirtualNextGrid6?


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.

#35 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 03 December 2015 - 05:43 PM

Hi Boki,

 

It's TVirtualNextGrid6.



#36 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 03 December 2015 - 05:52 PM

And some other thing:

 

Is there a way to set the column header height in virtualgrid ?



#37 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 December 2015 - 08:43 PM

Hi Karl,

You need to set HeaderHeight property of GridView.
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.

#38 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 December 2015 - 09:44 PM

PS. Not sure how setting Height work in VirtualGrid (since there is no actual row :))

 

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.

#39 karl

karl
  • Members
  • 52 posts
  • Gender:Male
  • Location:Austria

Posted 04 December 2015 - 12:17 AM

Thanks Boki, works fine :)

 

Well, It's no big deal since setting it for each individual row works just fine. But I thought you (as you're the developer) should know how it works :D



#40 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 04 December 2015 - 01:26 AM

Hi Karl,

 

In next update seek for new event OnMeasureRowHeight event. Maybe you can find it useful.


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