derek@sun4dts.dts.ine.philips.nl (derek) (04/17/91)
When I insert a TListBox or derivative into a TWindow or derivative (actually TScroller) the only colour I can get is bright white on red. According to the Tvision additional document on disk, this means that it is not mapping correctly. I have had a lot of trouble understanding this colour mapping. The manual is just not very clear at all. Does this really mean that I am not supposed to be using TListBox derivatives in a Twindow, only in a TDialog? I can presumably use a non-modal TDialog, but that means I have to have the scrollbars on the inner box instead of what I consider the more natural outer window frame. (I don't need any buttons or input boxes. I'll specify the listbox as bounds-1 of the dialog box in X and Y, and grow as gfGrowHiX OR gfGrowHiY.) So do I override the window getpalette method to map to dialog colours, or do I use a non-modal dialog box? If I use a Twindow, am I going to have any problems returning selected information to the desktop? Best Regards, Derek Carr DEREK@DTS.INE.PHILIPS.NL Philips I&E TQV-5 Eindhoven, The Netherlands Standard Disclaimers apply.
roth@oasys.dt.navy.mil (Pete Roth) (04/19/91)
In article <714@sun4dts.dts.ine.philips.nl> derek@sun4dts.dts.ine.philips.nl (derek) writes: >When I insert a TListBox or derivative into a TWindow or derivative (actually >TScroller) the only colour I can get is bright white on red. According to >the Tvision additional document on disk, this means that it is not mapping >correctly. I have had a lot of trouble understanding this colour mapping. The >manual is just not very clear at all. I agree with you about the color mapping - what a kludge! However, you might look at Ch 4 of the tvision manual in the section entitled 'what color is your view?'. Check from there to the end of the chapter. The last section has an example in the section 'adding new colors'.a In the first example it shows the line CMyWindow = CBlueWindow + #84 ; The #84 in this line is the _contents_ of an additional color in the palette. Whatever #84 is, is also a mystery, but can be decoded to be bright white on red. The next example has the line CScroller = #6#7#9 ; The #6#7#9 on this line indicates _where_ in the palette your colors _are_. Presumably, the TProgram unit stops mapping _locations_ when the @self is pointing to your App, at which point it starts mapping _colors_. egads. Hope this helps... - - - - - - - - - - - - - - - - - - - - - - - - - - Peter N Roth roth@oasys.dt.navy.mil Objects in this office are closer than they appear.