Database to show with changing column width Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
User avatar
doublemax
Moderator
Moderator
Posts: 14044
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Database to show with changing column width

Post by doublemax » Sat Feb 23, 2019 10:55 pm

...how can I find out the word which is under the mouse van clocked or by hoover event.
wxEVT_HTML_CELL_HOVER 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.
You can put any information you like into a link, then catch the wxEVT_HTML_LINK_CLICKED event.
how to set part of the text left to right (for hebrew text)
This might actually be a problem. I think wxHtmlWindow supports that only for the whole page, but not for individual sententes/paragraphs. But i'm not 100% sure.
Use the source, Luke!

Wolfgang
Earned some good credits
Earned some good credits
Posts: 120
Joined: Mon Jan 28, 2019 8:22 am

Re: Database to show with changing column width

Post by Wolfgang » Sun Feb 24, 2019 8:40 pm

thanks for the click event, right to left is possible with the html codes :D

Wolfgang
Earned some good credits
Earned some good credits
Posts: 120
Joined: Mon Jan 28, 2019 8:22 am

Re: Database to show with changing column width

Post by Wolfgang » Tue Feb 26, 2019 7:20 am

hebrew solved, it shows the whole page in hebrew automatically, only problem it needs protected spaces otherwise it switches back to ltr. So for paragraphes one has to write own wrapper.

But now to next problem, how do I get in which wxhtmlwindow a cell was clicked. I'm using aui and the user can create more than one wxhtml window.

there is a array pointer which hast the wxhtmlwindows in it. But how to find out in which window a click occured I did not figure out yet.

User avatar
doublemax
Moderator
Moderator
Posts: 14044
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Database to show with changing column width

Post by doublemax » Tue Feb 26, 2019 7:56 am

there is a array pointer which hast the wxhtmlwindows in it. But how to find out in which window a click occured I did not figure out yet.
wxEvent::GetEventObect() returns the object that created the event. That should be the wxHtmlWindow pointer in your case.
You could also use wxEvent::GetId() if you used unique IDs to create the different wxHtmlWindows.
Use the source, Luke!

Wolfgang
Earned some good credits
Earned some good credits
Posts: 120
Joined: Mon Jan 28, 2019 8:22 am

Re: Database to show with changing column width

Post by Wolfgang » Sun Mar 03, 2019 4:40 am

So far everything would be all right, meaning I have managed the double click and right click. And from which window it comes.

Problem arises with adding link to the text for that I will have to rewrite how the hebrew lines get generated as it flips back to ltr, But that is managable, I also managed to get the link text when clicked.

But now I have one big problem, the underlining by links is not possible to switch of, as the style text-decoration: none is not recognised.
How must I add now a the tag text-decoration: none to the a href tag?

User avatar
doublemax
Moderator
Moderator
Posts: 14044
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Database to show with changing column width

Post by doublemax » Sun Mar 03, 2019 9:45 am

But now I have one big problem, the underlining by links is not possible to switch of, as the style text-decoration: none is not recognised. How must I add now a the tag text-decoration: none to the a href tag?
I looked through the sources and it seems there is currently no way to do this.

You'll probably have to modify the wxWidgets sources for this, the easiest place should be here:
<wxdir>/src/html/winpars.cpp (around line 832)

Code: Select all

    str = styleParams.GetParam(wxS("text-decoration"));
    if ( !str.empty() )
    {
        // Only underline is supported.
        if ( str == wxS("underline") )
        {
            m_WParser->SetFontUnderlined(true);
            m_WParser->GetContainer()->InsertCell(
                new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
        }
    }
Here you chould add support for "text-decoration: none".
Use the source, Luke!

Wolfgang
Earned some good credits
Earned some good credits
Posts: 120
Joined: Mon Jan 28, 2019 8:22 am

Re: Database to show with changing column width

Post by Wolfgang » Sun Mar 03, 2019 12:34 pm

found your <uoff> handle posting, with that it goes,

And with that it now seams that everything is working as it should, or at least I can make a plan to make what I want.

Thank you a lot.

User avatar
doublemax
Moderator
Moderator
Posts: 14044
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Database to show with changing column width

Post by doublemax » Sun Mar 03, 2019 1:07 pm

found your <uoff> handle posting, with that it goes
Nice, i had forgotten about that. It's better than having to modify the wx sources.
Use the source, Luke!

Post Reply