NextGrid6 string processing, NextVirtualGrid6 and a few questions and bugs
#21
Posted 01 December 2015 - 09:42 PM
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]
--
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 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
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.
--
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 01 December 2015 - 11:40 PM
Yay , 4000 Rows added and fitted in 4 milliseconds.
Thanks Boki.
#25
Posted 02 December 2015 - 01:25 AM
Great
I will add for tomorrow OnGetRowHeight, and also forgot to add OnHeaderClick
--
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 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
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.
--
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 02 December 2015 - 03:21 AM
Thank's Boki,
I'm going to do that.
#29
Posted 02 December 2015 - 03:50 AM
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
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
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
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; )
--
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 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
Posted 03 December 2015 - 05:26 PM
Hi Karl,
Is this is for TNextGrid6 or TVirtualNextGrid6?
--
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
Posted 03 December 2015 - 05:43 PM
Hi Boki,
It's TVirtualNextGrid6.
#36
Posted 03 December 2015 - 05:52 PM
And some other thing:
Is there a way to set the column header height in virtualgrid ?
#37
Posted 03 December 2015 - 08:43 PM
You need to set HeaderHeight property of GridView.
--
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
Posted 03 December 2015 - 09:44 PM
PS. Not sure how setting Height work in VirtualGrid (since there is no actual row )
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.
#39
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
#40
Posted 04 December 2015 - 01:26 AM
Hi Karl,
In next update seek for new event OnMeasureRowHeight event. Maybe you can find it useful.
--
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