W
And when I click on the button the dialog should show. When I done I click OK and the values from dialog are reflected in the cell…I think in this case the dialog is technically not a wxGridCellEditor, it's just a normal dialog. A wxGridCellEditor is added as a child control of the grid at the exact position and size of the cell.Statistics: Posted by doublemax@work — Tue Nov 24, 2026 12:31 pm
W
doublemax,When I click on the cell(not the button) it should just behave as read-only cell.And when I click on the button the dialog should show. When I done I click OK and the values from dialog are reflected in the cell…Thank you.Statistics: Posted by ONEEYEMAN — Tue Nov 24, 2026 11:15 am
W
For displaying "text + button" you definitely need a custom renderer.Whether you need an editor depends on what you want to happen when the user clicks into the cell. With the default renderer, the button will disappear, and you get the "normal" text entry like in a default grid.Statistics: Posted by doublemax@work — Tue Nov 24, 2026 10:39 am
W
Hi,I have a grid where one column will have "text + button".When the cell is clicked there will be no difference - only the string will be selected. And it will be read-only.When the button is clicked the dialog will be displayed where the cell editing will be done and upon clicking "OK" the text in the cell will be updated with the new text.I think I will need both Renderer and Editor, but I'm not sure.Thank you.Statistics: Posted by ONEEYEMAN — Tue Nov 24, 2026 6:35 am
W
Thx.Will do.Statistics: Posted by ONEEYEMAN — Mon Nov 23, 2026 6:02 pm
W
The message box contetnts - with _() because it is a string literal, titleStr - with wxGetTranslation() because it is a wxStringCode: wxMessageBox(wxString::Format(_("Line %d is incorrect"), line), wxGetTranslation(titleStr)); wxTest.zipStatistics: Posted by T-Rex — Mon Nov 23, 2026 9:19 am
W
Create a wxInputStream for the resource, then use the wxAnimation::Load(wxInputStream &stream) overload.Statistics: Posted by doublemax@work — Mon Nov 23, 2026 7:37 am
W
Hi, ALL,I'd like to load gif file from the resources and use it in the animation control.However I don't see anything in the docs on how to do that.The sample is also not helpful.Any pointers?Thank you.Statistics: Posted by ONEEYEMAN — Sun Nov 22, 2026 9:59 pm
W
T-Rex,Then how do I mark it for translation?Thank you.Statistics: Posted by ONEEYEMAN — Sun Nov 22, 2026 5:32 am
W
This version works for me:Code: wxMessageBox(wxString::Format("Line %d is incorrect", line), wxGetTranslation(titleStr));Looks like _() is just for static literals, not for wxString objects, according to its declaration.Statistics: Posted by T-Rex — Sun Nov 22, 2026 12:31 am
W
How about this (untested):Code: wxMessageBox( wxString::Format( _("Line %d is incorrect"), line), _( titleStr ) );Statistics: Posted by doublemax — Sat Nov 21, 2026 11:21 pm
W
T-Rex,line is an integer.The static exception is about translation...I'm not passing a regular wxString- im passing a composting function...Thank you.Statistics: Posted by ONEEYEMAN — Sat Nov 21, 2026 9:43 pm
W
%d is for the number. Looks like you are passing the string there.Statistics: Posted by T-Rex — Sat Nov 21, 2026 9:41 pm
W
Hi ALLin my code I used to write:Code: wxMessageBox( _wxString::Format( "Line %d is incorrect", line), _( titleStr ) );However im now start getting static assertion during compilation.How do I best rewrite that?Thank you.Statistics: Posted by ONEEYEMAN — Sat Nov 21, 2026 8:46 pm
W
Hi2 things1. Not all WM on Linux have task bars.2. It may not be possible on Wayland to position the TLW.Thank you.Statistics: Posted by ONEEYEMAN — Thu Nov 19, 2026 3:27 pm
W
BTW: for a Windows only solution, this should work:https://learn.microsoft.com/en-us/windo ... taskbarposYes, I found this before but I'd prefer a multi-platform solution.Statistics: Posted by bigpilot — Thu Nov 19, 2026 1:13 pm
W
BTW: for a Windows only solution, this should work:https://learn.microsoft.com/en-us/windo ... taskbarposStatistics: Posted by doublemax — Thu Nov 19, 2026 1:20 am
W
I show the dialog when the timer has elapsed, so not due to a mouse-click. I'm currently displaying it in the right lower corner, which works fine. However, when the user has his/her taskbar at the top I want to show the dialog there, near the taskbaricon. Idem when the taskbar is on the left or right of the screen.Interesting idea to use wxDisplay::GetGeometry(). I'll try it out. Thanks for the tip.Statistics: Posted by bigpilot — Wed Nov 18, 2026 10:38 pm
W
When do you show the dialog? If it's to an response to a click on wxTaskBarIcon, you have the mouse coordinates which i would use to position the dialog.If you display it at any time, not in response to a user action (which is at least questionable from a UX point of view, maybe wxNotificationMessage is more suitable), you could try wxDisplay. You might be able to deduct the taskbar position from the difference of wxDisplay::GetGeometry() and wxDisplay::GetClientArea(). Just an idea,…
W
Is there a way to find out the position of the taskbar (left, right, top, bottom) on the screen? I'm displaying a small dialog near the taskbaricon and am currently assuming it's at the bottom right corner. But what if the taskbar is at the top I ask myself.Statistics: Posted by bigpilot — Wed Nov 18, 2026 1:47 pm
W
Yes the layers you added manually are deleted when your plot (mpWindow) is destroyed.DelAllLayers() is called in the destructor of mpWindow with the parameter mpForceDelete.So no need to call DelAllLayers() when you delete your plot.You have more informations in the doc page.Statistics: Posted by lr83 — Tue Nov 17, 2026 9:41 am
W
Hello, a question about deleting mpWindow* and its sub-components within wxsmith:I understand that the components created by wxsmith are deleted "internally" at the end,does that also apply to mpWindow and its sublayers ? In particular, does it apply to layers which I added manually not via wxsmith (calling new mpFXYVector()) ? I don't get any errors from memory leaks but I see that in MathPlotDemo the destructor calls Code: mPlot->DelAllLayers(mpForceDelete, false);In my destructor generated…
W
Ok, thx.Statistics: Posted by ONEEYEMAN — Fri Nov 13, 2026 12:21 am
W
The time depends on whether the DB is accessed locally, over the network or the cloud. Ok, in that case retrieving data that's not needed doesn't sound like a good idea So this is preferred? I was actually turning to this solution myself, but wanted to see if there is something better...Maybe there are more elegant solutions, but personally i'd have no problem doing it that way. It's also not a design decision with wide range consequences. You could probably refactor this with little effort at…
W
doublemax,Code: MyDialog::MyDialog(wxWindow *parent, wxWindowID id, const wxString &title, int type, std::vector<wxString> &data1, std::vector<wxString> &data2, std::vector<wxString> &data3 )I feel like wasting the data2/data3 when displaying data1. I mean there is no reason for those to exist.The real question is how much time it costs to retrieve data2 and data3. If if leads to a significant delay (>~0.5s) i'd say it's not a good solutionThe time depends on whether the DB is accessed locally,…
W
Code: MyDialog::MyDialog(wxWindow *parent, wxWindowID id, const wxString &title, int type, std::vector<wxString> &data1, std::vector<wxString> &data2, std::vector<wxString> &data3 )I feel like wasting the data2/data3 when displaying data1. I mean there is no reason for those to exist.The real question is how much time it costs to retrieve data2 and data3. If if leads to a significant delay (>~0.5s) i'd say it's not a good solutionOK, so introduce the IsValid() in the dialog?Then let the…
W
doublemax,Whether that is acceptable or not, depends on performance and /or memory penalty for that operation.Interesting...How do one measure smth like this?Usually you as the developer should know what data you work with, and which DB operations you call, and have a general idea of its performance. I'd say in most cases retrieving more data than you need shouldn't be a big issue, but without knowing details, i can't be sure.I was talking about following:Code: MyDialog::MyDialog(wxWindow…
W
1. If I retrieve the data in the caller than I will waste 2 parameters.Whether that is acceptable or not, depends on performance and /or memory penalty for that operation.Interesting...How do one measure smth like this?Usually you as the developer should know what data you work with, and which DB operations you call, and have a general idea of its performance. I'd say in most cases retrieving more data than you need shouldn't be a big issue, but without knowing details, i can't be sure.2. If I…
W
doublemax,1. If I retrieve the data in the caller than I will waste 2 parameters.Whether that is acceptable or not, depends on performance and /or memory penalty for that operation.Interesting...How do one measure smth like this?2. If I retrieve the data in the dialog constructor and there will be an error during retrieval I might end up with the memory leak.It's unclear why this should unconditionally lead to a memory leak.Can I do "delete this"" on such error?Thank you.Statistics: Posted by…
W
1. If I retrieve the data in the caller than I will waste 2 parameters.Whether that is acceptable or not, depends on performance and /or memory penalty for that operation.2. If I retrieve the data in the dialog constructor and there will be an error during retrieval I might end up with the memory leak.It's unclear why this should unconditionally lead to a memory leak.Statistics: Posted by doublemax — Thu Nov 12, 2026 9:22 pm