Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To Grid or To Browse?

Status
Not open for further replies.

ArevProgrammer

Programmer
Apr 7, 2001
38
0
0
US
Hello All,

Which one offers ease of use and better control on a
form when displaying Parent or Child records?
A Grid or Browse window.


Thanks!

Scott Rome was not built in a day. Be patient!
 
I personally think that ease of use and better control are mutaully exclusive. A browse is easier to use, but a grid affords more control over not only displaying data but adding other control sources (combo boxes, check boxes) in lieu of plain old text, as well as different colors for rows based on a particular value in the row. The list goes on from there.

Dave S.
 
Scott,
Note: On a form, a Browse is just a specialized grid object. In fact, if you add "NAME ObjectName" to a Browse caommand, then you can access all the Grid object properties and methods through this object reference.

Rick
 
Rick,

could you give a simple example of your browse using 'ObjectName'.

Thanks
WJS
 
wjs2

If you use this:
USE myTable.dbf shared again 0
BROWSE NAME myBrowse

The myBrowse becomes an object like any other VFP objects (if you bring up the debugger and look in the local windows) its treated as an actual grid, and all the myBrowse properties are listed there and can be changed on-the-fly.

 
WJS,
I'm not sure I can add more, any specific questions? It's real easy to try in the command window.

Rick
 
Thanks for the responses.

This is an explanation of what I would like to do. If a column in a table contains a path and file name, a double click the the row and column in the browse grid would cause the use of a shellexecute with the the contents of that row and column.

This doesn't sound like it should be too difficult but I haven't figured it out. How do I know which row and column has been double clicked?

Thanks
WJS
 
Use a grid, it will be a lot easier to control. Put your code in the dblclick event of the textbox of the column. Something like: && The DECLARE could be put in your main program. Just the last line is needed.
Code:
LOCAL lnRetval, lcFile, lcOperation
STORE this.value to lcFile
lcOperation = "Open"
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER handle,;
STRING @sFile,;
STRING @lp,;
STRING @dir,;
STRING @dir1,;
INTEGER ncmd
lnRetval = ShellExecute(0, lcOperation, lcFile, "", "", 1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top