🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #9668

Re: Colours in Menus

#9668
From: mesard
Date: Thu, 15 Dec 1988 11:25
19 lines
1629 bytes
everson%COMPSCI.BRISTOL.AC.UK@rice.edu writes:
>Does anyone know a way of forcing the menu system in SunView to use your
>own defined colourmap...?

SunView uses the 0th and 255th slots in the Root window's colormap as the
background and foreground for menus.  It insists on setting them to the
foreground and background colors that were in effect when you started
Suntools.  So if you're using a 256 color CMS, it has to step on your
first and last colors, to place the menu's colors into the colormap.  So
the short answer is, don't use the first or last color of your map.

That should prevent the "flash".  If your question really was about how to
specify the colors for menus from within a program, then I would say "I
don't know," and probably, "You can't."  The fg and bg colors get reset
somewhere between the time you call menu_show() and the time the menu is
displayed.  If it's before the menu_gen_proc() is called, then you might
be able to access the root window's colormap from within the
menu_gen_proc() and undo the "reset."  But I doubt it is, and I doubt you
can.
Technical Details
Message-ID: <8812051721.AA27631@rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!xanth!nic.MR.NET!tank!ncar!mailrus!cornell!uw-beaver!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!xanth!nic.MR.NET!tank!ncar!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: mesard@wilma.bbn.com
Newsgroups: comp.sys.sun
Subject: Re: Colours in Menus
Message-ID: <8812051721.AA27631@rice.edu>
Date: 15 Dec 88 11:25:25 GMT
Sender: usenet@rice.edu
Organization: Rice University, Houston, Texas
Lines: 18
Approved: Sun-Spots@rice.edu
Original-Date: Mon, 05 Dec 88 09:50:48 -0500
X-Sun-Spots-Digest: Volume 7, Issue 56, message 5 of 14
X-Issue-Reference: v7n33