XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

wxWidgets Discussion Forum

Official forum for the wxWidgets Cross-Platform GUI Toolkit

C++ Development • Re: wxGridCell{Renderer,Editor} - do I need both?

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

C++ Development • Re: wxGridCell{Renderer,Editor} - do I need both?

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

C++ Development • wxGridCell{Renderer,Editor} - do I need both?

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

C++ Development • Re: Taskbar position

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

C++ Development • Re: Taskbar position

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,…

C++ Development • Taskbar position

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

Announcements and Discoveries • Re: Mathplot update / delete layers ?

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…

C++ Development • Re: Design suggestion needed

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…

C++ Development • Re: Design suggestion needed

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,…

C++ Development • Re: Design suggestion needed

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…

C++ Development • Re: Design suggestion needed

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…

C++ Development • Re: Design suggestion needed

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…

C++ Development • Re: Design suggestion needed

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…

C++ Development • Re: Design suggestion needed

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