Search found 46 matches

by mbeardsley
Thu Jan 31, 2019 2:25 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

As I said, you seem to be confused about the purpose/intent of wxGridCellEnumRenderer. Yes, I HAVE read the documentation. For example, the documentation for wxGridCellEnumRenderer states : This class may be used to render in a cell a number as a textual equivalent. The corresponding text strings ar...
by mbeardsley
Wed Jan 30, 2019 10:34 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

Thank you for the wonderful (but irrelevant) reference on enums, but I am quite aware of what an enum is - and it has very little to do with the issue at hand. If wxGridCellEnumRenderer is supposed to render a digit instead of the text associated with that digit (as you seem to think), then why woul...
by mbeardsley
Wed Jan 30, 2019 10:04 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

It doesn't seem like you quite understand the issue. wxGridCellEnumRenderer does NOT work correctly on a wxGrid, UNLESS you either : 1) derive a new class from wxGrid and override the CanGetValueAs() and GetValueAsLong() methods 2) derive a new class from wxGridCellEnumRenderer and override the Draw...
by mbeardsley
Wed Jan 30, 2019 8:49 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

Ticket #18336 created for this issue.
by mbeardsley
Wed Jan 30, 2019 7:48 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

No, that doesn't really work, I think you need to examine that a bit more closely. The editor part works fine, but once you edit the cell (and then move on to some other cell), you are left with a "digit" in the cell instead of the actual words. In your case, the cell starts out with a word, only be...
by mbeardsley
Wed Jan 30, 2019 5:40 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

Well, I thought that I could simply override GetString(), unfortunately, GetString is not defined as virtual in wxGridCellEnumRenderer.

So, I guess that I will have to override the whole Draw() method instead. This is getting messier each step of the way.
by mbeardsley
Wed Jan 30, 2019 4:58 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

Re: wxGridCellEnumRenderer not working

After further investigation, I have found what I think to be the problem. The code for wxGridCellEnumRenderer::GetString is as follows: wxString wxGridCellEnumRenderer::GetString(const wxGrid& grid, int row, int col) { wxGridTableBase *table = grid.GetTable(); wxString text; if ( table->CanGetValueA...
by mbeardsley
Tue Jan 29, 2019 3:44 pm
Forum: C++ Development
Topic: wxGridCellEnumRenderer not working
Replies: 13
Views: 171

wxGridCellEnumRenderer not working

I can't seem to get wxGridCellEnumRenderer to do anything. Perhaps I am missing an important step? I want to have the user choose between options of "Left", "Right", "Up", or "Down", and have the cell rendered as such (with the "actual" cell values being 0,1,2, or 3. This seems to be what the wxGrid...
by mbeardsley
Fri Jan 04, 2019 1:00 am
Forum: C++ Development
Topic: WxGrid questions
Replies: 9
Views: 288

Re: WxGrid questions

Yeah, that's what I suspect that I'll end up doing.

It just seemed simpler at first glance to use a wxGrid, since it had everything I needed, except for single cell selection.

Thanks.
by mbeardsley
Wed Jan 02, 2019 8:15 pm
Forum: C++ Development
Topic: WxGrid questions
Replies: 9
Views: 288

Re: WxGrid questions

Basically, I want to show a "grid-like" widget that has a programmable number of boxes. Each box represents an item in the world from 1 to N. When the user clicks on a box, a frame to the right will be displayed containing the data associated with that item. The user can then view and/or edit that d...
by mbeardsley
Wed Jan 02, 2019 2:59 pm
Forum: C++ Development
Topic: WxGrid questions
Replies: 9
Views: 288

Re: WxGrid questions

Well, there could be anywhere from like 20 to 2000 (and I won't know how many until runtime). I thought that by using the wxGrid I could gain a lot of functionality (like scrolling if needed). It seems that wxGrid has MORE than what I need, I just want to enforce the "one-selected-cell-only" rule. T...
by mbeardsley
Wed Jan 02, 2019 12:36 am
Forum: C++ Development
Topic: WxGrid questions
Replies: 9
Views: 288

WxGrid questions

1) Is there some way to disable all group selection functions? I want to disallow the user from ever having more than one cell selected. For my purposes, the selected cell is the "active item", and it makes no sense for there to be more than one active item. 2) Is there some way to change the color ...
by mbeardsley
Tue Jul 11, 2017 6:42 pm
Forum: Compiler / Linking / IDE Related
Topic: Using CMAKE with a custom configuration
Replies: 1
Views: 391

Re: Using CMAKE with a custom configuration

Well, after a few more rounds of web searching, I found this that seems to work... set_property( GLOBAL PROPERTY DEBUG_CONFIGURATIONS "Debug;MyCustomConfig") This seems to tell any underlying find_library calls to look for the debug library versions for those configurations. I had actually looked th...
by mbeardsley
Tue Jul 11, 2017 4:06 pm
Forum: Compiler / Linking / IDE Related
Topic: Using CMAKE with a custom configuration
Replies: 1
Views: 391

Using CMAKE with a custom configuration

In addition to the normal "release" and "debug" configurations, I am trying to build a custom configuration but have been unable to get the wxWidgets FindPackage to give me the correct set of libraries (it keeps giving me the release versions and for this config I need the debug ones). I suspect tha...
by mbeardsley
Tue Feb 28, 2017 10:05 pm
Forum: C++ Development
Topic: Scrolling a wxGrid while it is being updated
Replies: 11
Views: 1085

Re: Scrolling a wxGrid while it is being updated

It's not just a re-sort. The "new" data may have more or less rows than the "old" data. If the "new" data has more rows, I can add them without any issues. But, if the "new" data has fewer rows, deleting the (now) extra rows causes the problem (but only if a scroll operation is in progress). I can l...