Generic wxListCtrl in Report Mode (wxMac) Topic is solved

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.
Post Reply
elliswr
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Apr 05, 2009 2:39 am

Generic wxListCtrl in Report Mode (wxMac)

Post by elliswr »

So far as I can tell, wxlistctrl on mac in native mode does not respond to EVT_LIST_COL_CLICK if it is a wxLC_VIRTUAL listctrl. And the current possible workaround is to set the wxSystemOption mac.listctrl.always_use_generic. However, I cannot find an example of how to do this.

I attempt to do it in the same place that I set the About menu location and the help menu location, in the initiation of the first frame:

Code: Select all

#if defined (__WXMAC__) || defined (__WXOSX__)
	wxApp::s_macAboutMenuItemId = MENU_ABOUT;
	wxApp::s_macPreferencesMenuItemId = MENU_OPTIONS;
	wxApp::s_macHelpMenuTitleName = "&Help";
	wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);
#endif
But that just gives me an error about wxSystemOtions not being defined in this scope.

Any help is much appreciated.
tasdev
Knows some wx things
Knows some wx things
Posts: 29
Joined: Tue Apr 26, 2005 12:18 am
Location: Australia

Post by tasdev »

Hi elliswr

This works for me:

Code: Select all

wxSystemOptions::SetOption(wxMAC_ALWAYS_USE_GENERIC_LISTCTRL, 1);
Cheers

td
elliswr
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Apr 05, 2009 2:39 am

include

Post by elliswr »

Thanks for the quick reply, but I am still getting the same error.

I think I am missing the definition of wxSystemOptions. Are there any #include lines that I need to have in this file?
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Follow the link :

http://docs.wxwidgets.org/stable/wx_wxs ... temoptions
Include files

<wx/sysopt.h>
"Keyboard not detected. Press F1 to continue"
-- Windows
Post Reply