[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Interface with 64 toggleable elements: what's the best way?



Sean McAfee wrote:
> Hi, folks--
...
> I was able to create labels with white text using this method, but
> when I changed the "fg" to "bg", the labels did not have white
> backgrounds.  I tried many different code permutations, but without
> any success, so I gave up on that idea.

Probably because letters are being written with fg only.
Maybe you could try set GdkFill to GDK_OPAQUE_STIPPLED.
Pango does all kinds of things with text too.

> My next idea was to represent the bits as pixmaps: an empty circle for
> a clear bit, and a filled circle for a set bit.  I want my program to
> be completely standalone, so now I'm trying to create a pair of
> textual xpm's that look like decent circles, which isn't completely
> trivial.

It's much easier to create an outline and solid circle using
gdk_draw_arc() onto GdkPixmap at the start of your program.

> I could keep slogging on, but I thought I would first ask you folks
> for some advice.  Besides the two above approaches, I thought of two
> others.  The first is to represent each bit as a canvas widget onto
> which I'd draw (say) filled or empty circles or rectangles.  This
> would involve asking the canvas for its current size, which, at least
> under Tk, was always a somewhat dicey proposition.  The other was to
> change my current 33x4 table into a single canvas widget, onto which
> I'd draw everything: labels, set bits, and clear bits.
> 
> Are any of my ideas workable, or is there a better way?  Thanks in
> advance for any help.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]