Re: Treeviews
From: James J. Gavan (jgavandeletethis_at_shaw.ca)
Date: 02/24/05
- Next message: Chuck Stevens: "Re: moving data from one place to another in a text file"
- Previous message: Richard: "Re: MF Collection Class speed"
- In reply to: Kellie Fitton: "Re: Treeviews"
- Next in thread: Kellie Fitton: "Re: Treeviews"
- Reply: Kellie Fitton: "Re: Treeviews"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Feb 2005 18:42:03 GMT
> Kellie Wrote:
>
> I think we should add a "Browse" button to the dialogue as well. If the
> user
> clicks the browse button, a ListView popup window should provide a
> complete
> listing of all the entries from the dataBase's masterFile. I don't like
> to
> use resource files when it comes to including a menu or a dialogue box
> in the
> graphical window, I prefer to hardCode my resources so I don't have the
> needs
> to include a .DLL file in my projects. Regards.
>
> Kellie.
>
You might add a Listview - but I'm not - read on !
DESIGN v PROGRAMMING
Your comment, (re Listview) is in the realm where you have put your
'systems analyst' hat on to design so that you are communicating to the
end user. Couldn't agree more.
In ye olden dayse using DOS, display a screen and prompt the user to
enter a Chart of Accounts or Customer Number etc. They were supposed to
remember them. Actually bean counters got very good at memorizing coding
systems. It worked but wasn't terribly helpful.
So with VISOC (predecessor to Net Express), yours truly jumps into OO
and Windowing. (Background - although Dialog System had a history in DOS
days, starting with Panels, it wasn't included in VISOC - just Dialog
Editor and GUI classes. I *think* Dialog System was re-introduced with
one of the versions of N/E V 3.0. As I've indicated, world wide, lots of
folks now using Dialog System as opposed to the Dialog Editor and GUI
class approach).
So now I'm rummaging through books looking for tips and eventually hit
on a paperback, 'Tips on APIs" or something. The author has a screenshot
- simple record input on the left accompanied by a Listbox (not
Listview) on the right. "That's it !", I sez to myself. "That's the
approach I'll take". So using the templates I've dreamed up that's the
route I went - record editing on the left and a Listbox on the right.
Now N/E OO-wise didn't initially mention Listviews but there are Dialog
System demos. I haven't used them but I have a bit of an aversion to
them - they seem to me, at least, to gobble up too much memory
displaying quite a chunk, or even the whole record. (From comments in
Answer Exchange, can be done but a little messy 'editing' individual
columns. Not having gone that route, I can only observe).
Following on the theme 'don't gobble up memory' I keep my elements in a
Listbox to a minimum - Name/Description Key and Other ("Other" depending
upon the file/DB table might be something they want to sort on). Initial
display of the Listbox sorted by default to show names alphabetically.
Just in case - three pushbuttons above Listbox to allow user to see
records sorted by one of the three I've mentioned above.
The logic to keeping Listbox entries to a minimum - why for each element
display 100, 200, or 500 characters for each when the user might only
access three of the records to edit. Click on the Listbox and I
immediately retrieve the specific record from File/DB - the click gives
me the index in the Listbox which is the identical index for the Sorted
Collection where I retrieve the File/DB Key. (Could do the retrieving
via the Listbox - but using Three Tier System approach - I retrieve from
the Sorted Collection outside of the dialog display class).
Then I see one of my smart buddies in Answer Exchange using a Treeview
as the Master Menu to his application. He still allows for traditional
pop-ups and dropdown menus, but the emphasis is on the flexibility of
viewing via the Treeview. Real neat.
Now what I have produced to test the Treeview is :-
Root "Cheese"
Level 1 - Continent
Level 2 - Country
Level 3 - Cheese name
Just to keep it simple. But what I'm really after is the above structure
applied against an oil/gas plant. Expanding the Treeview I have the
equivalent contents of a Listbox (not a Listview, as you suggested).
Think on Listboxes/Listview - I don't think they can easily be an
amalgam of different records (???). But my Treeview approach is - and
from user selection I can edit one of three files/DB depending upon the
Level selected.
Note I still use the Listbox approach for individual files - e.g.
editing Oil Company/Gas Plant names.
DIALOG and RESOURCE
Something else you don't like :-). Come on, you surely must be using
some designing tool to view what you want. If not and you are truly
creating dynamically, then you really are using a pick and shovel
approach - no your aren't - yours is a wheel with four straight sides.
Using the Dialog Editor to create/view my end result, I do have some
dialogs with a lot of entry-fields all of the same nomenclature - so be
damned if I'm gong to identify them as Value1, Value2, Value3 in the
Dialog Editor. My approach - dynamically create them passing x,y, w and
h - but it's a bit of suck-it-and-see initially to get their correct
placement. The x, y, cx, cy in the Dialog Editor can roughly be
translated multiplying by 1.4 or 1.5. (Again one of those MS things -
Horizontal Dialog Units).
Out of curiosity - confirm what you are actually doing to get your
screen image.
DIALOG or DIALOGUE
Which is it. I see you using 'dialogue' which is what I instinctively
use as an ex-Brit. Without thinking to put the spellchecker on
'English-English' as opposed to "Colonial-English" :-) it always picks
me up on my English spelling. Similarly as M/F markets in the former
colonies I assiduously spell it DIALOG EDITOR, just as M/F do.
Jimmy
- Next message: Chuck Stevens: "Re: moving data from one place to another in a text file"
- Previous message: Richard: "Re: MF Collection Class speed"
- In reply to: Kellie Fitton: "Re: Treeviews"
- Next in thread: Kellie Fitton: "Re: Treeviews"
- Reply: Kellie Fitton: "Re: Treeviews"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]