home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.ms-windows.programmer.misc:5260 bit.listserv.win3-l:12766
- Path: sparky!uunet!psgrain!ee.und.ac.za!shrike.und.ac.za!pc17.cc.und.ac.za!lotter
- From: lotter@cc.und.ac.za (Eddie Lotter)
- Newsgroups: comp.os.ms-windows.programmer.misc,bit.listserv.win3-l,comp.windows.ms.programmer
- Subject: TBrowse?
- Date: Fri, 22 Jan 1993 06:14:34 GMT
- Organization: University Of Natal (Durban)
- Lines: 36
- Message-ID: <lotter.140.727683274@cc.und.ac.za>
- NNTP-Posting-Host: pc17.cc.und.ac.za
-
-
- I have read myself into a stupor now, and I still haven't been
- able to find an elegant solution to this seemingly simple task:
-
- In Turbo Vision, the TListBox allows you to tell it what to
- display. This facilitates, for example, displaying only one
- field from an object, but if that item is selected from the
- listbox, then both fields (e.g. Code, Description) can be
- edited in a modal dialog.
-
- Now with TPW, the TListBox has its own string collection and
- does not allow you to control what it displays! So it seems
- the only way to accomplish the above scenario is to have a
- collection of the Code/Description object *and* a listbox
- filled only with the Description (which is what I want).
-
- This causes some very interesting logistical situations which,
- apart from the already apparent wasteage of memory, are rather
- ridiculous. When the user clicks on a listbox entry, I have to
- use the listbox index to find the corresponding element in the
- collection of Code/Description objects and edit them. If the
- Description is modified I have to delete the listbox entry and
- insert the changed value.....
-
- Please tell me I missed a complete section of the manual which
- describes how to accomplish this!
-
- Personally I feel there are many situations where only a
- portion of an object need be listed, but without duplicating
- that portion in the listbox!!
-
- Cheers
- Eddie lotter@cc.und.ac.za
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The right to do something does not mean that doing it is right.
- - William Saffire
-