Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to show Browse at run time?
Message
 
 
À
09/02/2009 14:11:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01380196
Message ID:
01380405
Vues:
41
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))))
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform