Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to show Browse at run time?
Message
From
09/02/2009 16:22:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01380196
Message ID:
01380407
Views:
51
You're welcome.

>Tore, Thank you very much!
>
>>
>>I will show you a really powerful trick I learnt many years ago. There are situations where a grid can be extremely slooow, but a browse can be almost immediate. And sometimes building a separate form with a grid on it just for a quick look is overkill. In those situations this solution is really handy. The trick is to use two browse after each other. This is an example
>>Use (_foxcode) Again && Or any other table
>>DEFINE WINDOW FoxWindow FROM 10,10 SIZE 1,1 NAME FoxWindow
>>FoxWindow.top=50
>>FoxWindow.left=50
>>FoxWindow.WIDTH=550
>>FoxWindow.HEIGHT=500
>>FoxWindow.Caption='Test'
>>Browse In Window FoxWindow Save Name FoxBrowse nowait
>>#if .f.
>> Public FoxBrowse as Grid && to enable intellisense
>>#endif
>>FoxBrowse.left=0
>>FoxBrowse.top=0
>>FoxBrowse.width=FoxWindow.width
>>FoxBrowse.height=FoxWindow.height
>>FoxBrowse.HighlightStyle= 1
>>FoxBrowse.HighlightBackColor=0x00ff00
>>FoxBrowse.setall('DynamicBackColor', 'IIF(Mod(Recno(),2)=0,Rgb(255,255,255),Rgb(170,170,170))')
>>FoxBrowse.AutoFit()
>>Activate Window FoxWindow
>>On Key Label Enter Keyboard '{esc}' Plain
>>Browse last
>>On Key Label ENTER
>>Release Windows FoxBrowse
>>Release Windows FoxWindow
>>Messagebox('You picked record no.' + Transform(Recno()) + Chr(13)+Chr(10);
>> + 'field 1 is ' + Transform(Evaluate(Field(1))) + Chr(13)+Chr(10);
>> + 'field 2 is ' + Transform(Evaluate(Field(2))))
Previous
Reply
Map
View

Click here to load this message in the networking platform