Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 34 total
Thread Grid Row varying height and hiding border lines
Mon, Sep 14 2015 7:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I was able to create a lovely Calendar that works perfectly for my needs. >>

Nice. Smile

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jan 13 2016 11:07 AMPermanent Link

Trinione

Currently, it takes about a second for the blank custom calendar grid to be created. This time is noticeable, and even moreso when several months, thus several forms, are required.

I am wondering if an already created form can be cloned/duplicated - events without creating the entire form?

Or, can the grid, with the created cell layout, be copied to another new grid?

I have attached a screenshot of the blank calendar layout. The grey cells are where the data shall go, just above it shall show the relevant day number.



Attachments: calendarBlank.png
Wed, Jan 13 2016 11:43 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< Currently, it takes about a second for the blank custom calendar grid to be created. This time is noticeable, and even moreso when several months, thus several forms, are required. >>

I would need to see your code in order to give any performance advice.  Usually, performance problems are related to a lack of BeginUpdate..EndUpdate calls.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jan 13 2016 12:38 PMPermanent Link

Trinione

Tim:
<< I would need to see your code in order to give any performance advice. >>
Ok.

\\

I came across this bit of Delphi code, its for a Panel, but says it would work for any component.
http://www.swissdelphicenter.ch/torry/showcode.php?id=785

Don't know if it applies, but the quest for a solution led me there.
Wed, Jan 13 2016 1:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


Okay, I got your form via email.

I'm seeing 356 msecs for the creation time here using IE11, not 1 second.  In your BuildGrid method, you definitely want to add this:

 grdCalendar.BeginUpdate;
 try

 finally
    grdCalendar.EndUpdate;
 end;

But, that didn't affect the time that much here.  In general, any other type of time that is over-and-above the built-in TCalendar is due to the fact that you're using a form instead of just a straight up custom TControl-descendant.

<< I came across this bit of Delphi code, its for a Panel, but says it would work for any component.
http://www.swissdelphicenter.ch/torry/showcode.php?id=785

Don't know if it applies, but the quest for a solution led me there. >>

No, it doesn't apply.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jan 13 2016 5:34 PMPermanent Link

Trinione

Tim:
<< I'm seeing 356 msecs for the creation time here using IE11, not 1 second. >>
I meant in terms of clicking a button to create it and having it display on screen.

<<  grdCalendar.BeginUpdate;  try  finally     grdCalendar.EndUpdate;  end; But, that didn't affect the time that much here.  >>
Same here. No difference.

<< In general, any other type of time that is over-and-above the built-in TCalendar is due to the fact that you're using a form instead of just a straight up custom TControl-descendant. >>

What I would like to do is run frmBlankCalendar.Create() so procedure BuildGrid is run once - thus creating grdCalendar. So, a blank Calendar grid is available for cloning/duplicating.

Can a copy of the grdCalendar be used as a new grid component named say grdMonthJan2016.

I just realised I didn't send another related program. Shall email it.

~
Thu, Jan 14 2016 9:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Trinione,

<< What I would like to do is run frmBlankCalendar.Create() so procedure BuildGrid is run once - thus creating grdCalendar. So, a blank Calendar grid is available for cloning/duplicating. >>

This won't work - to create a duplicate requires *creating another copy* that will be the target of the duplication.  You're not buying yourself any time savings.

<< Can a copy of the grdCalendar be used as a new grid component named say grdMonthJan2016. >>

I wouldn't go down that route.  You're just dancing around the issue, which is that this should be created as a normal control, not a form.  A normal control doesn't need form persistence and other things that add time to the creation of the control.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jan 14 2016 12:04 PMPermanent Link

Trinione

<< I wouldn't go down that route.  You're just dancing around the issue, which is that this should be created as a normal control, not a form.  A normal control doesn't need form persistence and other things that add time to the creation of the control. >>

Ok. I'm gonna take off my dancing shoes and create a custom control.

Since this is a TGrid component in the main, I take it I will have to start from there.

Looking thru the manual I am not seeing any info on Custom Control creation. Can you point me in the right direction with any docs or threads on here.

To be clear - I can run my app with what I have got, I was just trying to speed it up so this is not Critical. But, I would use this opp to learn the Custom Control creation as well as to offer a faster response in version 2 of my product.
Thu, Jan 14 2016 12:06 PMPermanent Link

Trinione

Found this on YouTube. Going to start here.

Elevate Web Builder 2 Control Creation Tutorial
https://www.youtube.com/watch?v=dZEQBqP8NME
Thu, Jan 14 2016 12:24 PMPermanent Link

Trinione

Tim:
For manual grids, can new Properties SetCols and SetRows be added at some point?

So, to define a grid with six columns would be grdName.SetCols(6) and twelve rows, grdName.SetRows(12).

Or, add a parameter to allow NewColumn(6) and InsertRow(12).
« Previous PagePage 2 of 4Next Page »
Jump to Page:  1 2 3 4
Image