I am an infrequent user of VFP and have never mastered the GUI.
I need to allow a user to choose storage locations from the structure below for several fields on a screen where the possible choices are in a structure several layers deep.
Is there a control to handle this or a simple way to roll my own?
This is a simple representation of the locations to chose from.:
Shop/Cabinet/Shelf1
Shop/Cabinet/ Drawer1
Shop/Bench/Shelf1
Office/Bench/Drawer1
Office/Cabinet/ Drawer1
Office/Cabinet/Shelf1
Office/Bench/Shelf1
Office/Bench/Drawer1
Trailer/Bench/Drawer1
Trailer/Cabinet/ Drawer1
Trailer/Cabinet/Shelf1
TrailerBench/Shelf1
Trailer/Bench/Drawer1
Even though the Drawers and Shelves appear to repeat they are all different and can add up to 150 choices for a location in my office. I clearly do not want to scroll through the entire list to make a choice.
Any help would be appreciated.
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
Looking at what you have I would consider using a series of drop downs for each part. If you only have three parts to the location you can setup the selection screen in advanced. You can populate and enable the next combobox quickly. If each subset could have additional subsets, you may need to add or show things dynamically.
If you feel the two click method for each part isn't what you want, you could use a series listboxes going to the right for each part.
The other might be an <<shudder>> ActiveX control. The ProjectExplorer project Doug Hennig has made available uses the TreeView ActiveX control. https://github.com/DougHennig/ProjectExplorer
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Wednesday, May 19, 2021 6:41 PM To: profoxtech@leafe.com Subject: Navigating structure using list boxes?
I am an infrequent user of VFP and have never mastered the GUI.
I need to allow a user to choose storage locations from the structure below for several fields on a screen where the possible choices are in a structure several layers deep.
Is there a control to handle this or a simple way to roll my own?
This is a simple representation of the locations to chose from.:
Shop/Cabinet/Shelf1
Shop/Cabinet/ Drawer1
Shop/Bench/Shelf1
Office/Bench/Drawer1
Office/Cabinet/ Drawer1
Office/Cabinet/Shelf1
Office/Bench/Shelf1
Office/Bench/Drawer1
Trailer/Bench/Drawer1
Trailer/Cabinet/ Drawer1
Trailer/Cabinet/Shelf1
TrailerBench/Shelf1
Trailer/Bench/Drawer1
Even though the Drawers and Shelves appear to repeat they are all different and can add up to 150 choices for a location in my office. I clearly do not want to scroll through the entire list to make a choice.
Any help would be appreciated.
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
Thanks for the reply Tracy,
I think the simplest way to fill the list in a combo box will be to use a series of arrays that get updated as each choice is made.
I am trying to figure out where in the code to place the select to array statement so that the combo box can find ithe array
Maybe you have a better approach.
Thanks,
Joe
On Wed, May 19, 2021 at 7:13 PM Tracy Pearson tracy@powerchurch.com wrote:
Looking at what you have I would consider using a series of drop downs for each part. If you only have three parts to the location you can setup the selection screen in advanced. You can populate and enable the next combobox quickly. If each subset could have additional subsets, you may need to add or show things dynamically.
If you feel the two click method for each part isn't what you want, you could use a series listboxes going to the right for each part.
The other might be an <<shudder>> ActiveX control. The ProjectExplorer project Doug Hennig has made available uses the TreeView ActiveX control. https://github.com/DougHennig/ProjectExplorer
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Wednesday, May 19, 2021 6:41 PM To: profoxtech@leafe.com Subject: Navigating structure using list boxes?
I am an infrequent user of VFP and have never mastered the GUI.
I need to allow a user to choose storage locations from the structure below for several fields on a screen where the possible choices are in a structure several layers deep.
Is there a control to handle this or a simple way to roll my own?
This is a simple representation of the locations to chose from.:
Shop/Cabinet/Shelf1
Shop/Cabinet/ Drawer1
Shop/Bench/Shelf1
Office/Bench/Drawer1
Office/Cabinet/ Drawer1
Office/Cabinet/Shelf1
Office/Bench/Shelf1
Office/Bench/Drawer1
Trailer/Bench/Drawer1
Trailer/Cabinet/ Drawer1
Trailer/Cabinet/Shelf1
TrailerBench/Shelf1
Trailer/Bench/Drawer1
Even though the Drawers and Shelves appear to repeat they are all different and can add up to 150 choices for a location in my office. I clearly do not want to scroll through the entire list to make a choice.
Any help would be appreciated.
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]
Hi Joe,
You can trigger the code in the Valid event of the Combobox. Ted has frequently said that events should call methods. The Valid event may only have one line of code in it. ThisForm.PopulateLevelTwo()
When the combobox is configured as a DropDown list the user may be more keyboard focused, and type to get to the selection. The Valid may fire for each keystroke. This is when you might consider using the LostFocus event to prevent heavy IO related code.
Or what I consider might be one good use of a timer, the timer is enabled and reset each time Valid fires. The Timer code will verify it is enabled, then disable itself, then call the population code. If you can avoid using a timer, I would. They can stack up and get triggered multiple times.
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Friday, May 21, 2021 3:37 PM To: profoxtech@leafe.com Subject: Re: Navigating structure using list boxes?
Thanks for the reply Tracy,
I think the simplest way to fill the list in a combo box will be to use a series of arrays that get updated as each choice is made.
I am trying to figure out where in the code to place the select to array statement so that the combo box can find ithe array
Maybe you have a better approach.
Thanks,
Joe
On Wed, May 19, 2021 at 7:13 PM Tracy Pearson tracy@powerchurch.com wrote:
Looking at what you have I would consider using a series of drop downs for each part. If you only have three parts to the location you can setup the selection screen in advanced. You can populate and enable the next combobox quickly. If each subset could have additional subsets, you may need to add or show things dynamically.
If you feel the two click method for each part isn't what you want, you could use a series listboxes going to the right for each part.
The other might be an <<shudder>> ActiveX control. The ProjectExplorer project Doug Hennig has made available uses the TreeView ActiveX control. https://github.com/DougHennig/ProjectExplorer
HTH, Tracy
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Joe Yoder Sent: Wednesday, May 19, 2021 6:41 PM To: profoxtech@leafe.com Subject: Navigating structure using list boxes?
I am an infrequent user of VFP and have never mastered the GUI.
I need to allow a user to choose storage locations from the structure
below
for several fields on a screen where the possible choices are in a structure several layers deep.
Is there a control to handle this or a simple way to roll my own?
This is a simple representation of the locations to chose from.:
Shop/Cabinet/Shelf1
Shop/Cabinet/ Drawer1
Shop/Bench/Shelf1
Office/Bench/Drawer1
Office/Cabinet/ Drawer1
Office/Cabinet/Shelf1
Office/Bench/Shelf1
Office/Bench/Drawer1
Trailer/Bench/Drawer1
Trailer/Cabinet/ Drawer1
Trailer/Cabinet/Shelf1
TrailerBench/Shelf1
Trailer/Bench/Drawer1
Even though the Drawers and Shelves appear to repeat they are all
different
and can add up to 150 choices for a location in my office. I clearly do not want to scroll through the entire list to make a choice.
Any help would be appreciated.
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]