home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / pascal / 8511 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.9 KB

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