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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help me KISS please

Status
Not open for further replies.

shenlon

Programmer
Jul 9, 2003
47
0
0
US
Alright, the current form I am working on is a pageframe with 3 pages. On the first page is a grid and 2 command buttons. The buttons allow you to add/edit records that are displayed in the grid.

On the second page are all of the labels and text boxes in the table that are disabled until the user clicks on the Edit button on either the first or second page. There is also a list of the options that are installed on the crrent record. The options are read into the list with an SQL statement from the vehopt table. When the user clicks the edit options button below the list, they are taken to the third page, the options page.

On the options page there are 2 lists and a command group with Add, Add All, Remove, Remove All and Save buttons. Currently, when the user clicks edit option the form reads through the list (FOR to lst.ListCount) and plugs each option currently installed into the OptionsInstalled list on the 3rd page, whose RowSourceType is 0. The other list is a list of all of the options that are read in from the OPMAST table and the RowSourceType is 6.

What I want to do is to disable all of the items in the OPMAST list that are already installed on the current record. I did a search and understand that I need to add a "\" character to the beginning of the row that I want disabled, however I can not seem to get this to function properly while reading the information in from the OPMAST table. Please let me know of any ideas you guys may have to help.
 
Shenlon,

Although you didn't say it, it sounds to me like you have the look of the FFC Mover Class without the functionality of it. In the Mover Class as you move options they actually do move and the need for a disabling "\" goes away.

You might also want to consider keeping the pageframe but hiding the page tabs so that your command buttons programatically select the proper page. Otherwise you have to handle the enabled status of the non-current pages in your form refresh.

Steve
 
How do I hide the tabs? That's the same thing my boss said to me today so I switched to multiple forms in a FormSet instead of using the pages on a page frame. Is there any difference between using the pageframe and multiple forms? Also, what Mover class are you talking about? I am sorry but I am still pretty green to all of this and trying to find my way around.
 
Oh, and I am using VFP 6.0 if that makes a difference.
 
Set this property

thisform.pageframe1.tabs = .F.

Steve
 
I just realized that I didn't answer all of your questions...

I can't really give you a clean answer on Pageframes vs. Formsets and which is better. Like most things in VFP each has their own strong points and you need to experiment to see what is most appropriate for the current need.

Regarding the Mover Class, in VFP 6 click on Tools / Component Gallery / Foundation Classes / User Controls. I've used the SuperMover class quite a bit and from your earlier description it sounds like this might be a good fit for your situation. There's lots of threads on this and the VFP Forms, Classes & Controls forum on how to use it.

Lots of luck.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top