Database to show with changing column width Topic is solved
Re: Database to show with changing column width
Did now manage to distinguish between left and right click,
But at the moment only possible if really clicked and not if holded down or double clicked. So any help there would be appreciated.
But at the moment only possible if really clicked and not if holded down or double clicked. So any help there would be appreciated.
Re: Database to show with changing column width
With wxHtmlCellEvent::GetMouseEvent() you should be able to distinguish between different types o clicks.
https://docs.wxwidgets.org/trunk/classw ... event.html
BTW: wxHtmlWindow only understands HTML 1.0, so your styling options will be limited. It will also be quite slow if you have a table with thousands of rows when you resize the window. Consider wxWebView instead which uses the underlying native browser.
https://docs.wxwidgets.org/trunk/classw ... event.html
BTW: wxHtmlWindow only understands HTML 1.0, so your styling options will be limited. It will also be quite slow if you have a table with thousands of rows when you resize the window. Consider wxWebView instead which uses the underlying native browser.
Use the source, Luke!
Re: Database to show with changing column width
Was thinking of not showing all at once and only show those which requested.
Must check if this is possible to generate the html on request just in memory.
Must check if this is possible to generate the html on request just in memory.
Re: Database to show with changing column width
That's the way to go anyway. Don't create temporary HTML files on disc.Must check if this is possible to generate the html on request just in memory.
However, this has no effect on the render speed.
Use the source, Luke!
Re: Database to show with changing column width
Yes, made it like that:doublemax wrote: ↑Thu Feb 21, 2019 8:06 am With wxHtmlCellEvent::GetMouseEvent() you should be able to distinguish between different types o clicks.
https://docs.wxwidgets.org/trunk/classw ... event.html
BTW: wxHtmlWindow only understands HTML 1.0, so your styling options will be limited. It will also be quite slow if you have a table with thousands of rows when you resize the window. Consider wxWebView instead which uses the underlying native browser.
Code: Select all
void MyFrame::OnHtmlCellClicked(wxHtmlCellEvent &event)
{ wxMouseEvent testm = event.GetMouseEvent();
if (testm.GetEventType() == wxEVT_RIGHT_UP) {
wxEVT_LEFT_DCLICK not working
wxEVT_RIGHT_DOWN not working
Re: Database to show with changing column width
Just rendering about 150 rows at once, that should be quick enough.
Re: Database to show with changing column width
Just in case you did not notice started c++ programming two weeks ago, and only 3 to 4 hours a day. So that is why I wrote I still have to check if it is possible.
Re: Database to show with changing column width
I just looked into the source code and yes, wxHtmlWindow does not handle these events, so you'll have to catch them yourself.
Check <wxdir>/src/html/htmlwin.cpp to see how to find the htmlcell where the click occurred.
Check <wxdir>/src/html/htmlwin.cpp to see how to find the htmlcell where the click occurred.
Use the source, Luke!
Re: Database to show with changing column width
wxwebview
Can I also get the clicks like with wxhtml, in the sample this is not included, that is why I ask.
Can I also get the clicks like with wxhtml, in the sample this is not included, that is why I ask.
Last edited by Wolfgang on Thu Feb 21, 2019 8:40 am, edited 1 time in total.
Re: Database to show with changing column width
htmlwin.cpp sample I do not have, have to check on github and download it.
Re: Database to show with changing column width
It's not a sample, it's part of the wxWidgets source code.htmlwin.cpp sample I do not have, have to check on github and download it.
Use the source, Luke!
Re: Database to show with changing column width
If I did see it right:
wxHTMLCtrl can only load from disc, does not accept File system handlers registration.
wxWEbview cannot handle cell clicks nativ like wxhtmlctrl can, right?
So basically both are only to work if I manage to get the missing part to work, or did I miss something?
wxHTMLCtrl can only load from disc, does not accept File system handlers registration.
wxWEbview cannot handle cell clicks nativ like wxhtmlctrl can, right?
So basically both are only to work if I manage to get the missing part to work, or did I miss something?
Re: Database to show with changing column width
You can pass a string with HMTL code to wxHtmlWindow through wxHtmlWindow::SetPage(), which should be all you need for your task. In addition to that it does support loading files through wxFileSystem, e.g. wxMemoryFileSystem.wxHTMLCtrl can only load from disc, does not accept File system handlers registration.
Use the source, Luke!
Re: Database to show with changing column width
So far htmlwindow working, I can get clicks, but the question is now, how can I find out the word which is under the mouse van clocked or by hoover event. And the next question is there a way, that I can somehow give a word or number to a woord, or can i catch the link, so it does not try to call the link. As I could write in there additional information.
Re: Database to show with changing column width
Another question, how to set part of the text right to left (for hebrew text)
Last edited by Wolfgang on Sun Feb 24, 2019 7:24 pm, edited 1 time in total.