Re: Detecting mouse events in the SQL grid

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Detecting mouse events in the SQL grid
Дата
Msg-id 1361631039.15634.63.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Detecting mouse events in the SQL grid  (Kari Karkkainen <kari_karkkainen@yahoo.com>)
Ответы Re: Detecting mouse events in the SQL grid
Список pgadmin-hackers
On Sun, 2013-02-17 at 12:21 -0800, Kari Karkkainen wrote:
> Hi,
>
> I'm trying to add some additional mouse event detection into the SQL grid, but I'm not succeeding. Besides pgAdmin,
alsowxWidgets is new to me, so I'm probably missing something obvious... 
>
> The grid was already detecting EVT_MOUSEWHEEL, so I tried to use that as my guideline:
>
> In ctlSQLGrid.h for the ctlSQLGrid class I added two private functions on the bottom:
> private:
> void OnCopy(wxCommandEvent &event);
> void OnMouseWheel(wxMouseEvent &event);
> void OnMouseLeftDown(wxMouseEvent &event);
> void OnMouseLeftUp(wxMouseEvent &event);
>
> In ctlSQLGrid.cpp I added two events:
> BEGIN_EVENT_TABLE(ctlSQLGrid, wxGrid)
> EVT_MENU(MNU_COPY, ctlSQLGrid::OnCopy)
> EVT_MOUSEWHEEL(ctlSQLGrid::OnMouseWheel)
> EVT_LEFT_DOWN(ctlSQLGrid::OnMouseLeftDown)
> EVT_LEFT_UP(ctlSQLGrid::OnMouseLeftUp)
> END_EVENT_TABLE()
>
> An then in ctlSQLGrid.cpp I defined the functions e.g. like this:
> void ctlSQLGrid::OnMouseLeftUp(wxMouseEvent &event)
> {
> SetTotals();
> }
>
> However, I never hit these functions by clicking the mouse, and I don't understand why. Would really appreciate any
advice.
>

Are you sure it's not already dealt with at the window level?


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re:
Следующее
От: Kari Karkkainen
Дата:
Сообщение: Re: Detecting mouse events in the SQL grid