Search found 374 matches

by mael15
Mon May 20, 2019 8:10 am
Forum: C++ Development
Topic: wxGrid open cell editor after tab
Replies: 14
Views: 376

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: 376

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: 376

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: 376

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: 376

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: 376

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: 639

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: 784

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: 784

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: 784

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: 784

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: 784

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~
by mael15
Mon May 06, 2019 11:08 am
Forum: Component Writing
Topic: clickable list with different custom controls for each column
Replies: 11
Views: 784

clickable list with different custom controls for each column

A couple of years ago I created this custom list: listClickable.jpg Every entry is clickable and a wxControl appears to edit the value, these include wxSpinCtrl, wxChoice and wxButton to remove the row from the list. The clickable values are wxStaticText and unfortuately these take a lot of time to ...
by mael15
Wed May 01, 2019 8:02 am
Forum: C++ Development
Topic: closing wxProgressDialog with a wxThread
Replies: 51
Views: 1263

Re: closing wxProgressDialog with a wxThread

wxWidgets has everything for you, mael. 1. quite exotic way it's wxCondition.Wait(functor) 2. True way - write your simple class That is one very simple and elegant way to solve my problem, thank you very much! I am a bit mad at myself for thinking "a condition with a counter would be nice" before ...
by mael15
Tue Apr 30, 2019 7:58 pm
Forum: C++ Development
Topic: closing wxProgressDialog with a wxThread
Replies: 51
Views: 1263

Re: closing wxProgressDialog with a wxThread

Btw, if your threads do only monotonous work you can use parallel algorithm for range. It was add into C++17 but it also provided in some libraries (wxWidgets doesn't have this features, though). If you on Windows there is PPL library. But it also could be implement with C++11 like here - https://s...