Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column ControlSource && DynamicBackColor Assign
Message
From
13/02/2002 08:11:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/02/2002 08:00:41
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00619330
Message ID:
00619385
Views:
15
>>>
>>>the rest of the code is fine, it's just the addition of 86 columns and the deletion of the 'old' 86 columns, preserving all the properties of the 'old' columns, like ColumnOrder, and the like
>>>
>>
>>Greg,
>>For 86 columns even doing it like that shouldn't take 2.5 secs. However you can significantly cut down the time if you used one single line of code to set columncount instead of individually deleting old columns (as I undertand you're doing something like removeobject).
>>If this is not a must at runtime you could save load time by doing that in designtime too.
>>Cetin
>
>Cetin,
>
>I hear what you say, ie This.ColumnCount = xxx
>However, setting the columnCount that way will also make them 'standard' columns. and I need my Column Class
>
>With respect to changing the things at design time, I can say that I did such things when I was learning vfp. Now, I write code in the Init if the grid, which then calls the classInit(). The classinit() handles most of the stuff.
>
>Thanks

Greg,
You heard but partially :) That wouldn't leave you with standart columns but would 'drop' them :) Something like this :
*Grid.init
Procedure init
  Lparameters tcRecordsource
  With this
    .Columncount = -1
    .recordsource = tcRecordsource
    nOldColCount = .columncount
    For ix = 1 to fcount(tcRecordsource)
      .AddColumn(ix, tcRecordsource,field(ix,tcRecordsource))
    Endfor
    .Columncount = nOldColCount
  Endwith
Endproc
Here what I do is to add columns to their 'standart' counterpart's position pushing 'standart' to end.

PS: I think you misunderstood my designtime suggestion. What I meant was if columncount, column formats etc would be static at runtime your 'grid' class could be changed in code at designtime.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform