1

Konu: LocatorGrid in Foxy Classes

In the instructions for the LocatorGrid in Foxy Classes, it says, i.a.:

"To use the LocatorGrid, simply drop it on your VFP form and set a few properties. These include csql, followField, followTable, followTag, isSpecialCharSet, lInGrid, lKeepFormat, nCurRec, mapCharSlower, and mapCharSupper."

First, it says "These include". Does this mean that there are other properties that should be changed?

Second, is there any place where the these properties are described, so that one would know what changes to make?

Regards,

Hans L

2

Re: LocatorGrid in Foxy Classes

Hi Hans,
In FoxyClasses\Docs folder there is FoxyClasses.chm. Under grids classes check MultiSelectGrid and LocatorGrid documentation. Also open sample forms in foxyclasses\samples in design mode and check what properties are set for different purposes. Here is a quick recap:

You can use it w/o setting a single property - form.init:

Visual Fox Pro
with thisform.LocatorGrid1

  .cSQL = '* from (" + _samples + 'data\Customer")'
  .Init()
endwith

This creates a grid like VFP native grid but with added capabilities of search/sort/filter (try right click on a column, header click, typing in a column)

And here is another sample with the properties you should use most (suppose we want to create a customer form from customer data and use LocatorGrid as the navigator instead of other ways):

-Create a new form and size it a bit (would put a lot of fields and a grid on it)
-Put a locatorgrid
-Put customer table in its dataenvironment
-Select as many fields as you want from customer table in DE and drag&drop on to form, beneath grid,  using RIGHT mouse button
-Select create multiple controls from the popup that pops when you drop (remember to use RIGHT button, otherwise it automatically creates a grid)
-Set locatorgrid's properties
cSQL: * from customer
followTable: customer
followTag: cust_id
followField: cust_id

-Run the form

3

Re: LocatorGrid in Foxy Classes

Thank you, Cetin. I will look at this tomorrow (I have worked on the grid quite a lot today).

Best regards,

Hans L

4

Re: LocatorGrid in Foxy Classes

I have started to experiment. Working well, except that I got error message at

Visual Fox Pro
If !('\MYHEADER.PRG'$Set("PROCEDURE"))

Well, this is probably becasue in my Main program, I have

Visual Fox Pro
SET DEFAULT TO SYS(5) + SYS(2003)

*
SET PATH TO ;
BITMAPS, DATA, FORMS, INCLUDE, LIBS, PROGS, REPORTS, D:\DATABASES\CLASS LIBRARIES\HANS FOXY CLASSES, ;
D:\DATABASES\CLASS LIBRARIES\HANS VFP COMMON CLASSES, D:\DATABASES\CLASS LIBRARIES\HANS VFP COMMON SUBCLASSES

"BITMAP ... REPORTS" refers to what is in my particular project.  So, I have no path to the same folders in Foxy Classes:
Bitmaps, classes, Data, DataUpdater, Docs, Forms, Include, Progs, samples (+ files checktree.FXP ... WS_FTP.LOG).

I don't even know if I need a path to them all, but it certainly looks as if I need a path to "Progs", which contains "myheader.PRG".

Kindly advise.

Hans L

5

Re: LocatorGrid in Foxy Classes

Comment that if ... endif block.

In the same init code you would see:

Visual Fox Pro
.AddObject("MyHeader1","myMSelHeader",tcCaption)

Make it:

Visual Fox Pro
.NewObject("MyHeader1","myMSelHeader","D:\DATABASES\CLASS LIBRARIES\HANS FOXY CLASSES\MyHeader.prg", "", m. tcCaption)

PS: Assumed myheader.prg  in folder D:\DATABASES\CLASS LIBRARIES\HANS FOXY CLASSES

6

Re: LocatorGrid in Foxy Classes

Okay, will do.

Thanks,

Hans L

7

Re: LocatorGrid in Foxy Classes

• Cetin, before I make the changes you suggested above, I have to ask this:

Where should I place Foxy Classes: Bitmaps, Classes, Data, DataUpdater, Docs, Forms, Include, Progs, Samples (+ files checktree.FXP ... WS_FTP.LOG), and how should I refer to them in all my "Main.prg" files, so that I do not need to make any changes to the Foxy classes as proposed by you above? (Or do I only refer to some of the folders and files in my Main.prg file?)

Regards,

Hans L

8

Re: LocatorGrid in Foxy Classes

I have looked a little more. Am I right in assuming that everything would work without changes if I refer to

D:\Databases\Class libraries\Foxy Classes\checktree.FXP through D:\Databases\Class libraries\Foxy Classes\WS_FTP.LOG?

It seems that all classes and a lot of prg files and forms and otehr files are directly under folder Foxy Classes.

Regards,

Hans L

9

Re: LocatorGrid in Foxy Classes

PLEASE NOTE!

I will do what I have not done: I will recreate all Hansfoxyclasses to be identical to Foxyclasses. After that, I will simply copy all folders and files from

D:\Databases\Class libraries\Foxy Classes

to

D:\Databases\Class libraries\HAns Foxy Classes

After that, I assume that everything will work as intended. If not, I will be back.

Regards,

Hans L

10

Re: LocatorGrid in Foxy Classes

Hans,
I am a little confused. On my computer it is:

d:\foxyclasses

and all foxyclasses folders/files are in that folder. I use it in multiple VFP projects which are located outside d:\foxyclasses. Simply in my projects I have these as included files:

d:\foxyclasses\classes\datetimectrls.vcx
d:\foxyclasses\classes\fontfx.vcx
d:\foxyclasses\classes\global.vcx
d:\foxyclasses\classes\grids.vcx
d:\foxyclasses\classes\importer.vcx
d:\foxyclasses\classes\mvrlst.vcx
d:\foxyclasses\classes\utils.vcx

d:\foxyclasses\classes\myheader.prg

d:\foxyclasses\bitmaps\arrowdn.bmp
d:\foxyclasses\bitmaps\arrowdnall.bmp
d:\foxyclasses\bitmaps\arrowup.bmp
d:\foxyclasses\bitmaps\arrowupall.bmp
d:\foxyclasses\bitmaps\bottom.bmp
d:\foxyclasses\bitmaps\bottom.msk
d:\foxyclasses\bitmaps\down.bmp
d:\foxyclasses\bitmaps\next.bmp
d:\foxyclasses\bitmaps\next.msk
d:\foxyclasses\bitmaps\previous.bmp
d:\foxyclasses\bitmaps\previous.msk
d:\foxyclasses\bitmaps\top.bmp
d:\foxyclasses\bitmaps\top.msk
d:\foxyclasses\bitmaps\up.bmp

11

Re: LocatorGrid in Foxy Classes

I am not surprised you are confused :-)  But I am sure that your last message will clear up things for me. I will, today, redo my class system as needed, because I do not think I did it entirely correct the first time. Ah, the learning curve ... :0(

Regards and thanks!

Hans L

12

Re: LocatorGrid in Foxy Classes

When you say "Simply in my projects I have these as included files: ", why do you need those files in your projects if you "... use it in multiple VFP projects which are located outside d:\foxyclasses." (by reference in your "Main.prg" file, I assume)?

Hans L

13

Re: LocatorGrid in Foxy Classes

No not in main.prg. Added to project and say I use classes in form.

14

Re: LocatorGrid in Foxy Classes

cetinbasoz yazdı:

Hans,
I am a little confused. On my computer it is:

d:\foxyclasses

and all foxyclasses folders/files are in that folder. I use it in multiple VFP projects which are located outside d:\foxyclasses. Simply in my projects I have these as included files:

d:\foxyclasses\classes\datetimectrls.vcx
d:\foxyclasses\classes\fontfx.vcx
d:\foxyclasses\classes\global.vcx
d:\foxyclasses\classes\grids.vcx
d:\foxyclasses\classes\importer.vcx
d:\foxyclasses\classes\mvrlst.vcx
d:\foxyclasses\classes\utils.vcx

d:\foxyclasses\classes\myheader.prg

d:\foxyclasses\bitmaps\arrowdn.bmp
d:\foxyclasses\bitmaps\arrowdnall.bmp
d:\foxyclasses\bitmaps\arrowup.bmp
d:\foxyclasses\bitmaps\arrowupall.bmp
d:\foxyclasses\bitmaps\bottom.bmp
d:\foxyclasses\bitmaps\bottom.msk
d:\foxyclasses\bitmaps\down.bmp
d:\foxyclasses\bitmaps\next.bmp
d:\foxyclasses\bitmaps\next.msk
d:\foxyclasses\bitmaps\previous.bmp
d:\foxyclasses\bitmaps\previous.msk
d:\foxyclasses\bitmaps\top.bmp
d:\foxyclasses\bitmaps\top.msk
d:\foxyclasses\bitmaps\up.bmp

Oh, so you mean that you put the above in the Project Manager's Class Libraries )vxc), Programs (prg) and Other files (bmp and msk)?

Hans L

15

Re: LocatorGrid in Foxy Classes

Yes:)

When you need one of them during form design, click books icon in form controls toolbar, add and select the class library that contains the class. Place on form - I added all of those classes also as default libraries:

Tools\Options\Controls tab
Select 'Visual class libraries'

Add all of them to list.

Then whenever I click books icon those libraries are there ready to be used.

16

Re: LocatorGrid in Foxy Classes

Okay! Great, I think I have it now.

Thanks,

Hans L

17

Re: LocatorGrid in Foxy Classes

Okay, I am getting there!

I know, for instance, how to select all fields (Select * ...) into the cursor, and how to show only a subset of the fields in the grid. But how do I show this subset of fields in a certain order?

Also, if I click/press Enter/press button "View" for one of the rows in order to open another window where I do show, for instance, all fields in order to do data manipulation, would I use the same cursor as in the Locatorgrid (which would contain all fields) or would I create a new cursor (Select ... into ...) for this new screen?

Regards,

Hans L

18 Son düzenleyen, cetinbasoz (18.03.2010 16:51:11)

Re: LocatorGrid in Foxy Classes

Instead of select * you would explicitly list the fields in desired order. ie:

Visual Fox Pro
select Country, City, Region, Company, Contact, Cust_id from customer into cursor crsCustomer nofilter

(same thing for Locatorgrid):

Visual Fox Pro
Country, City, Region, Company, Contact, Cust_id from customer

What I do for editing is to use the same form for the grid and editing fields, grid occupies just a portion of the form. It is a little hard to describe this in plain words. How about I show you on a short online session? If you think it is OK then we might do that on weekend I think (or at night - I don't know your timezone, ours is +2 - currently we are 6 hours ahead of EST, say Florida, didn't switch to daylight savings yet).

PS: In case you think an online session would do then we would use teamviewer for it. Download non commercial version from teamviewer.com.

19

Re: LocatorGrid in Foxy Classes

Cetin, very kind of you to offer an online session. However, we are going to Detroit this weekend.  Tonight would be best, if still possible. Since you are 6 hours ahead, and I will be home all day, you can Skype me and send an e-mail at any time. I will install TimeViewer. In the Skype message or e-mail message, please let me know what I should do with TimeViewer and what time we should get together. I will install TimeViewer now.

Regards,
Hans L

20 Son düzenleyen, cetinbasoz (18.03.2010 19:20:17)

Re: LocatorGrid in Foxy Classes

It is teamviewer. My Skype ID is cetin.basoz. My MSN ID is cbasoz atsign passport dot com (sorry afraid of spam, written like this). I keep MSN open more than Skype. But since I know that you will be calling I will open Skype too tonight.

I can't give exact timing though. I usually head to home around 8:30 PM my time and have dinner. Probably after 10 PM (it is home you know,  anytime in between 10 PM - 3 AM but I will try to make it as close as possible to 10 PM my time).

By the way, what is your skype ID? and/or MSN ID?

21

Re: LocatorGrid in Foxy Classes

Skype:  Oceanus60
MSN: None

And, yes, TeamViewer.

My wife just called and reminded me that we will be out between about 3-5. So from 11 pm your time should be fine.

Regards,

Hans L