Search found 452 matches

by mael15
Wed May 22, 2019 12:48 pm
Forum: C++ Development
Topic: wxGrid wxGridCellNumberEditor wxSP_WRAP
Replies: 4
Views: 402

wxGrid wxGridCellNumberEditor wxSP_WRAP

Devil seems to be in the details with wxGrid. I have a column displaying an angle, so min == 0 and max == 359 and i want the wxGridCellNumberEditorto wrap. So when the wxSpinCtrl shows 0 and the arrow down is pressed, the value should change to 359. I tried these thing unsuccessfully: - Spin()->SetE...
by mael15
Tue May 21, 2019 8:14 am
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

Unfortunately i didn't have enough time tonight to dig deep into it. But i traced through the code and the wxChoice editor definitely gets created and shown, but it closes again very quickly. I think even with CallAfter, the call to EnableCellEditControl() comes too early in this case. The next ste...
by mael15
Mon May 20, 2019 5:08 pm
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

Can you strip together a running sample? Yes, at least the tab behaviour can be seen, never mind the not working minus button at the end: #pragma once #include <wx/frame.h> #include <wx/app.h> #include <wx/grid.h> class MyGridCellButtonRenderer : public wxGridCellRenderer { public: MyGridCellButton...
by mael15
Mon May 20, 2019 8:10 am
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

a video would be easies to show this, I try to explain what happens. I have these five columns: string | choice | string | float | custom image a single left click on each shows the editControl just as expected with this code: void onGridLeftClick(wxGridEvent &evt) { CallAfter([this]() { EnableCellE...
by mael15
Fri May 17, 2019 2:13 pm
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

doublemax wrote:
Fri May 17, 2019 2:05 pm
Try catching only the wxEVT_GRID_SELECT_CELL event. (Just an idea, untested).
Tried it but it did not work unfortunately.
by mael15
Fri May 17, 2019 1:15 pm
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

Try calling event.Skip() and then use CallAfter(...) to execute your code so that it's called after the default TAB behavior. Thank you, this works only for string cells, not for float of choice. Same CallAfter works fine in a simple left click event with all kind of cells though: Connect(wxEVT_GRI...
by mael15
Fri May 17, 2019 12:43 pm
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

doublemax wrote:
Fri May 17, 2019 12:42 pm
Which event triggers onGridTab? I tested it with the grid sample and a random menu entry and it worked for me.

Code: Select all

Connect(wxEVT_GRID_TABBING, wxGridEventHandler(GridBase::onGridTab));
No good?
by mael15
Fri May 17, 2019 12:32 pm
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

Re: wxGrid open cell editor after tab

doublemax wrote:
Fri May 17, 2019 9:29 am
Try EnableCellEditControl( true ) instead of ShowCellEditControl().
Thank you, with EnableCellEditControl it flashes up briefly in the one cell that has a wxGridCellChoiceEditor, nothing can be seen with the standard string cells. What might be wrong?
by mael15
Fri May 17, 2019 9:03 am
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 1058

wxGrid open cell editor after tab

hi, I want a cell editor wxGrid to open after the next cell has been chosen. surprisingly, this does not do it: void onGridTab(wxGridEvent &evt) { OutputDebugString(wxString::Format(wxT("grid tab on %i|%i\n"), evt.GetCol(), evt.GetRow())); if (evt.GetCol() < 2) { GoToCell(evt.GetRow(), evt.GetCol() ...
by mael15
Mon May 13, 2019 8:44 am
Forum: C++ Development
Topic: unhandled unknown exception in wxThreadInternal::DoThreadStart
Replies: 24
Views: 1714

Re: unhandled unknown exception in wxThreadInternal::DoThreadStart

at certain conditions. get rid of this 3 threads, or use second stage Boss. I did get rid of these 3 additional threads per opened file, but I still get this error. I only create a wxThread::GetCPUCount() number of threads and one of them crashes with Nicht markiert 7220 0 Arbeitsthread ucrtbased.d...
by mael15
Fri May 10, 2019 4:22 pm
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 2190

Re: clickable list with different custom controls for each column

One more problem: Sometimes I use HideCol(int) and I want the containing wxSizer so shrink afterwards (and grow after ShowCol(int)). I am a little embarrassed but I have to admit I was always confused about FitInside(), Fit(), Layout() etc.
How can I make the wxSizer always have the minimal size?
by mael15
Wed May 08, 2019 8:24 am
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 2190

Re: clickable list with different custom controls for each column

- can I make float value cells to use the language settings, i.e. comma in german, point in english? I would guess this should happen automatically if you have a correct wxLocale active. hmmm, I am surprised by this: int lg = wxLocale::GetSystemLanguage(); const wxLanguageInfo *inf = wxLocale::GetL...
by mael15
Tue May 07, 2019 8:57 am
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 2190

Re: clickable list with different custom controls for each column

visual studio shows me that the wxStaticText ctor uses most of the time. I see, that's probably the size calculation using wxDC::GetMultiLineTextExtent. There's probably room for optimization knowing that all wxStaticText have the same font and similar texts. You could try subclassing wxStaticText ...
by mael15
Mon May 06, 2019 7:32 pm
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 2190

Re: clickable list with different custom controls for each column

So each time this list is refreshed, it takes about 3 seconds on my powerful developer machine, more on a good laptop that runs my app. Are you sure it's the creation of the controls that takes so long? Or could it be the sizer algorithm? In the latter case you could try to calculate the item posit...
by mael15
Mon May 06, 2019 3:20 pm
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 2190

Re: clickable list with different custom controls for each column

doublemax wrote:
Mon May 06, 2019 12:59 pm
Except for a totally custom-drawn control, wxGrid is really the only option i can think of.
Thanx. looks promising. I remember having too many problems with it a couple of years ago. But maybe it is improved or I am better now or I can make some compromises this time around. =P~