Shit happens

December 21st, 2007 Begemot Posted in Oбщее

Эхх, клонирую свою MFC программу под wxWidgets. Необходимо находясь в эдит контроле иметь возможность навигации по соседнему дереву, там я  просто просто в PreTranslateMessage в эдите отлавливал alt+стрелки\Page Down\UP менял обьект у события и форвадил дереву для обработки. На wx сделать не получалось, спросил в wx-users at lists.wxwidgets.org, в ответ от Vadim Zeitlin  получил

There is no way to make this work with native controls (such as wxTreeCtrl
under MSW): they have no idea about wx events so sending them to those
controls will obviously never do anything. We thought a few times in the
past to provide a way to generate a native keyboard message from e.g.
wxKeyEvent but this has never been done. If you feel like trying to do it,
it would certainly be welcome. Otherwise you will have to handle the keys
yourself manually (i.e. checks for arrow up and select the appropriate item
and so on).

Настроение с утра испортил:)

Иногда я думаю что лучше бы я писал какие-нибудь сложные алгоритмы, вместо написания простых софтин и постоянного траханья с интерфейсом и юзабилити.

Будем копать дальше, гда наша не пропадала:)

Related:

Comments are closed.