[gtkmm] Re: gtkmm-list digest, Vol 1 #748 - 7 msgs



gtkmm-list-request gnome org wrote:

Today's Topics:

  1. Re: automatic scrolling window (scrolledwindow) (David Kinyanjui)
  2. Gtkmm-forge digest, Vol 1 #556 - 1 msg (gtkmm-forge-request lists sourceforge net)
  3. ListHandle (Surya Kiran Gullapalli)
  4. Re: automatic scrolling window (scrolledwindow) (Lars Luthman)
  5. RE: ListHandle (Murray Cumming Comneon com)
  6. Event signals should connect _before_? (Murray Cumming Comneon com)
  7. Drag And Drop Context data (Ohrnberger, Erik)

On Thu, 13 Nov 2003, David Kinyanjui wrote:

Anyhow, I'm still trying to find help on how to automatically
make the scrollbars in a scrolledwindow (especially
the vertical scrollbar), position itself such that the current
focused widget (grabbing focus) is always visible at the bottom of the
scrolled window.
At this moment, I can only scroll  up and down by clicking the scrollbar.

I did something similar for a table widget I wrote for a sequencer.
I wrote a function scrollToRect, like this:

void GridWrapper::scrollToRect(int x1, int y1, int x2, int y2) {
 if (x1 < hAdj->get_value())
   hAdj->set_value(x1);
 else if (x2 > hAdj->get_value() + hAdj->get_page_size())
   hAdj->set_value(x2 - hAdj->get_page_size());
 if (y1 < vAdj->get_value())
   vAdj->set_value(y1);
 else if (y2 > vAdj->get_value() + vAdj->get_page_size())
   vAdj->set_value(y2 - vAdj->get_page_size());
}

I called this function every time the user selected a new cell, with
the boundaries of the cell as x1, y1, x2, y2. Maybe you could do
something like that, and use signal_focus_in_event in your widgets to
know when to call it?

Cosidering the above procedure, I'm now wondering of how I can connect a signal_focus_in_event callback!?
I have several checkButtons on my window (e.g checkbutton_isdischarged).
how can I connect the callback: chkIsDeceased->signal_focus_in_event(). for the above scrollToRect().


Thanks alot in advance
david






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