Page 3 of 3

Re: Database to show with changing column width

Posted: Sat Feb 23, 2019 10:55 pm
by doublemax
...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.

Re: Database to show with changing column width

Posted: Sun Feb 24, 2019 8:40 pm
by Wolfgang
thanks for the click event, right to left is possible with the html codes :D

Re: Database to show with changing column width

Posted: Tue Feb 26, 2019 7:20 am
by Wolfgang
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.

Re: Database to show with changing column width

Posted: Tue Feb 26, 2019 7:56 am
by doublemax
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.

Re: Database to show with changing column width

Posted: Sun Mar 03, 2019 4:40 am
by Wolfgang
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?

Re: Database to show with changing column width

Posted: Sun Mar 03, 2019 9:45 am
by doublemax
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".

Re: Database to show with changing column width

Posted: Sun Mar 03, 2019 12:34 pm
by Wolfgang
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.

Re: Database to show with changing column width

Posted: Sun Mar 03, 2019 1:07 pm
by doublemax
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.