wxDataViewCtrl problem with Key event Linux

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Earned a small fee
Earned a small fee
Posts: 20
Joined: Sat Nov 21, 2015 7:01 am

wxDataViewCtrl problem with Key event Linux

Postby Adwaith » Thu Jun 21, 2018 10:50 am

I am using wxDataViewCtrl to view and modify the shortcut key combinations of certain panels that I can open. In windows, everything is working alright. I am facing this issue only in Red Hat. My wxWidgets version is 3.0.1 and RHEL version is 7.4. Let me come to my issue. I get the key combinations of the keys I press from EVT_CHAR_HOOK and set it to the respective text column of dataviewctrl. My problem is, the key event gets hit only if I press Shift, Alt or Ctrl. If I press any other keys, it does not go to any of the key events but, a small popup appears which shows the letter I typed. Please note this happens only in RedHat. I also tried using EVT_KEY_DOWN, EVT_CHAR but they are of no use. I am creating the dataviewctrl in the below mentioned process. I have also attached the screenshot of how my implementation looks like.

Code: Select all

void KeyBoardShortcut::CreateDataTree()
   wxString SelectedValue = m_Keyboardcombo->GetString(0);
   m_TreeCtrl = new wxDataViewCtrl(this, MW_TREECTRL_KEYBOARD_SHORTCUT, wxDefaultPosition, /*wxSize(600, 500)*//*, style*/wxDefaultSize);
   m_shrtcut_model = new ShortcutModel(SelectedValue);


void KeyBoardShortcut::CreateColumn()
wxDataViewTextRenderer *tr =
      new wxDataViewTextRenderer("string", wxDATAVIEW_CELL_INERT);
   //wxSize textctrl =tr->GetSize();
   wxDataViewColumn *column0 =
      new wxDataViewColumn("Tabs", tr, 0, 350, wxALIGN_LEFT,

   // column 1 of the view control:
Capture.PNG (10.77 KiB) Viewed 437 times

Return to “Platform Related Issues”

Who is online

Users browsing this forum: Google [Bot] and 4 guests