Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setall method
Message
From
23/12/2002 06:03:09
 
 
To
23/12/2002 05:16:41
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00734011
Message ID:
00735339
Views:
10
This message has been marked as the solution to the initial question of the thread.
Hi!

""SetAll" sets expression for "dynamicfontbold" in EACH column of grid. You do not need this. You need this setting only for column that contains image. In your case, instead of "SetAll", you should do following:
this.column1.dynamicfontbold = "thisform.setimg()"

(Assuming column1 is a column with image control).

HTH.

>I did what You told me and it works.
>The fact now is that it runs slowly and it looks like the setall method run twice.
>I wrote few line of code in the Grid init method (this.setall("dynamicfontbold","thisform.setimg()","column")
>What i want to do is to avoid the double processing of the grid refresh()
>i was thinking about a lockscreen but I don't know where to put it
>
>Any suggestion ?
>Alessio
>
>PS HAve a Merry Xmas and a great New year
>
>>Hi!
>>
>>No, not by SetAll.
>>
>>If you have only few images, use DynamicCurrentControl and a few Image controls inside of grid column with different pictures.
>>
>>If you require images displayed just based on the image path stored in data, do following:
>>
>>Define method on form like below:
>>
>>* RefreshPictForEachGridRecord method - called from DynamicFontBold expression in grid.Column1
>>if empty(MyTableAlias.MyPictPath)
>>  thisform...Grid.Column1.Image1.Picture = "Images/DefaultPict.bmp"
>>else
>>  thisform...Grid.Column1.Image1.Picture = "Images/" + allt(MyTableAlias.MyPictPath)
>>endif
>>return .F.
>>
>>Then call this method in expression in some Dynamic* property of column with Image control. For example, in above sample it will be DynamicFontBold = "thisform.RefreshPictForEachGridRecord()"
>>
>>Method will be called for each record in process of grid refreshing, so it should work as quickly as possible Record pointer inside of the method, when called from Dynamic* expression from grid, is at the appropriate record.
>>
>>HTH.
>>
>>>Can I use the setall method to dynamically change the picture property of an image class in a grid column ?
>>>If not how can i do?
>>>
>>>Alessio
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform