Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simulate a grid - doesn't stay on top
Message
From
11/05/1999 07:24:13
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00216383
Message ID:
00217109
Views:
18
Rich,

Thanks for the very interesting explanation. I've gone the route of 2 half-screens next to each other in the top left. Good enough till I can get to VFP.


>>I want to simulate a grid within a window. There was a short window with a browse window positioned below it, but the pair was positioned in the upper left. It worked well on smaller monitor.
>>
>>I want one larger window, centered, with a browse that stays on top of it in the lower half. I tried DEFINE WINDOW Brow1 IN SCREEN "Payroll" but it gets caught behind "Payroll".
>>
>>Can I do this somehow? I'm not ready to port this to VFP yet.
>
>The typical way to do this in FPW 2.x was with an invisible button. I think there are chapters devoted to this method in "Developing FoxPro 2 Applications" type books. I'm sure there have been articles on how to do it in both FoxTalk and FoxPro Advisor. (You can search them online.)
>
>Basically it amounts to this: on the main form, in an area the same size and position as where you want the browse, you put a big invisible button. The WHEN of the button does a BROWSE NOCLEAR (not NOWAIT). The screen Setup code defines the window of the right size and does the BROWSE NOWAIT NOCLEAR. The Refresh code probably also calls the function containing the BROWSE NOWAIT NOCLEAR (which of course we were clever enough to put into a function to be called from several places). If not the screen's (OK, the READ's) Refresh code, then at least the valid for any button (or other object) which moves the parent table's record pointer calls the BROWSE NOWAIT NOCLEAR function to "Refresh the Grid".
>
>There are things which don't work well about this method. For example, if the user clicks on a button outside the grid (oops browse), that first click is "eaten" by the BROWSE losing focus and being disabled. The user has to click the button again to actually click the button.
>
>To leave the browse to the next object in the read, you can use ON KEY LABEL CTRL-TAB to simulate the fact that in VFP CTRL-TAB exits a grid object (many programmers did this in 2.6). Or you can put a prompt somewhere on the screen which says something like ENTER TO SELECT, ESC TO CANCEL and define ON KEY LABEL ENTER KEYBOARD DO EditChild.spr or some such...
>
>As I said, there are articles about this, and maybe chapters in FoxPro 2.x books.
>
>The best tip, of course, is that Grids in VFP work MUCH BETTER than this old 2.x kludge.
>
>Cheers,
>- Rich.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform