Re: [gtk-list] Re: Possible to place widgets *on top* of CList?

"Michael K. Johnson" <> writes:

> An example of how to pop up an arbitrary widget is in the gtkcombo.c
> source code.  It's not too hard to follow.

OK, I tried it, and I've come close to what I want, but I have a
couple of problems that make me wonder if this approach is suitable
for what I'm trying to do since our needs aren't quite the same as

For those that don't recall, I'm working on a register window for
GnuCash where when you click on a CList cell, an entry widget should
pop up under the cursor, and move to a new cell whenever you click
somewhere else.

I have two main problems (any help greatly appreciated):

1) I couldn't find much documentation on how the _grab/_focus
functions are supposed to be used.  Using the same approach as
combobox doesn't quite work.  I can't get my code so that you can both
edit text in the box, and get out of the box when you're finished.
It's one or the other, and I haven't discovered why yet.  I'm pretty
sure it's some misuse of _grab/_focus, but I couldn't figure out what
I'm doing wrong.  The first click event outside the entry widget, but
inside the CList is always ignored.

2) The combobox code I followed doesn't have any handling for
scrolling or moving windows.  This doesn't matter for coboboxes
because you can't move a window or do anything else while a combo list
is popped up, and clicking anywhere else takes the list down.  In the
code I'm working on, it's a big problem.  It's quite strange looking
to drag the register and leave the editing cell sitting by itself on
the X desktop.  Also, scrolling the CList leaves the editing widget

I'm beginning to wonder if it might be simpler just to copy gtkclist.h
and gtkclist.c and rename them to gtkclisteditable and add the
features we need.  Thoughts?

Thanks again.

Rob Browning <>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30

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