Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!unisoft!hoptoad!wet!seth From: seth@wet.UUCP (Seth Olitzky) Newsgroups: comp.lang.pascal Subject: Re: Turbo Vision, TListViewer Message-ID: <2186@wet.UUCP> Date: 7 Mar 91 18:48:10 GMT References: <1991Feb27.230255.46955@cc.usu.edu> Organization: Wetware Diversions, San Francisco Lines: 38 In article <1991Feb27.230255.46955@cc.usu.edu> slkww@cc.usu.edu writes: >I'm trying to learn Turbo Vision. As an exercise, I'm using TListViewer >to view a directory list inside a window, and I have two problems: > >- the color for the filenames is flashing white on red, as is the > color for the selected item. I've done nothing to change the > default palette; even if I wanted to, to book leaves me clueless. > Do I have to activate the palette somehow? >- even though the book states that TListViewer's Draw method "copes > with resizing," my directory list view does not change size with > the window. What does the book's statement mean? Turbo Vision has a somewhat sharp learning curve, but once over the hurdle its great. 1. You have used TListViewer on a TWindow, not on a TDialog. This causes the palette to be wrong. Certain items in Turbo Vision, buttons, list boxes, are designed to be inserted onto dialog boxes and not windows. The palette for a default TWindow is not large enough to handle these objects. Compare the palettes for TDialog and TWindow. See the difference. Flashing white on Red always means that you have a bad GetColor call and that the palette indexes could not be followed up to the application. 2. Don't use TListViewer. Its not made to be on a resized window. Use TSCROLLER. This works like a champ and all that you have to write is the Draw procedure. But you can find an example for all of this in the Turbo Vision book on around page 40 and upwards. Read it. Im also looking for other Turbo Vision crazies, besides myself. What the use of learning it all if I can't discuss it with someone. -- ----------------------------------------------------------------------------- Seth Olitzky seth@wet ...!sun!hoptoad!wet!seth ----------------------------------------------------------------------------