home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5260 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  2.0 KB

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