Re: Grabbing a GtkCList?



On 2001.12.04 01:45 Jean-Christophe Berthon wrote:
I'm not sure I understand it right but maybe you can set the style of the
button to pressed (I don't know exactly how but that should be possible)
and
then while dragging the mouse you can do a gtk_clist_moveto to scroll the
clist dynamically taking for parameters what can return
gtk_clist_get_selection_info.
So would be something like that

on_button_press()
{
  show clist;
  set button style to pressed;
}

on_mouse_move_over_clist()
{
  gtk_clist_get_selection_info(mouse_coord, clist_position);
  gtk_clist_moveto(clist_position);
}

on_mouse_move_end()
{
  set back button to default style;
}


I hope this is working (but the philosophy might be good...) and help
you.
But I'm really not sure I got right your question...


Hi, I really appreciate your tips. And yes that is what I ended up
doing. I looked at the gtkcombo.c source but it uses the old GtkList
and the GtkCList seems to not behave properly when I want to grab it.

So I ended up employing a timeout callback when the button was pressed
and the clist window was mapped and checking pointer position then
scrolling and selecting based on it.

PS, sorry if my posts didn't come out right, I'm having trouble
posting to the GTK+ list today.

--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/



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