Search found 235 matches

by purplex88
Thu Dec 12, 2019 4:54 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Maybe then I should simply use a real web browser for this :wink:
by purplex88
Thu Dec 12, 2019 2:19 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Thanks! If I just want to save the state of the html i.e. my highlights, can I use something called 'localStorage' https://javascript.info/localstorage ?
by purplex88
Thu Dec 12, 2019 12:05 am
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

You saved me from taking the complete Javascript script course over this small effect I was trying to achieve. Well done :). All I need to do is export the highlighted text from the control as HTML file.
by purplex88
Thu Dec 12, 2019 12:01 am
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

That "toggle marked text with click" works for me perfectly. :? . How?
by purplex88
Wed Dec 11, 2019 11:56 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Well, that worked for me.

I tried to load it using:

Code: Select all

wxString editorURL = "file:///C:/Users/purplex/Desktop/new146.html";
TextViewer = wxWebView::New(m_panel, wxID_ANY, editorURL);
Is that how you tried @doublemax?
by purplex88
Wed Dec 11, 2019 11:48 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

I'll try to keep it simple. Basically I'll just need a report viewer only and highlighter thing to markdown the report. Then, of course, I want to save work i.e. the page as HTML.
by purplex88
Wed Dec 11, 2019 10:42 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

So, is it really not possible to edit and save text as html within this control? Maybe via. Javascript again?
by purplex88
Wed Dec 11, 2019 10:12 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

I'd be happy if it works with at least 2 MB of text for now. Yes, I tried it with ~25 MB file and it appears to load it fine as well but because there's too much to scroll, it can get slow and unresponsive. Currently, I'd just focus on highlighting and seems like I'd need to learn some CSS / Javascr...
by purplex88
Wed Dec 11, 2019 9:23 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

@doublemax: I have a 20 secs photoshopped clip in which I tried to explain exactly what I am tying to do. I want to hover the mouse over text and it should highlight the line. When I mouseclick over it then it changes highlight. Okay, to achieve this. I know where the lines start and end. So, basica...
by purplex88
Wed Dec 11, 2019 8:15 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Okay, I see. I changed this: TextViewer = wxWebView::New(m_panel, wxID_ANY, ""); to: TextViewer = wxWebView::New(m_panel, wxID_ANY, "about:blank"); Now, it appears to work. It seems I will need to convert the text files into html to display the data and highlight it. I am not much aware of web devel...
by purplex88
Wed Dec 11, 2019 6:54 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Hi, It is Windows 8.1 OS and wxWidgets-3.1.2 setup environment under MSVS 2019. I am not exactly going to use the control to load internet web pages, but just local text (.txt/ .html) files.
by purplex88
Wed Dec 11, 2019 6:48 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

I want to just display a large .txt file. So for example, here's how a "sample text" should appear: WEBbrowserpng.jpg That's a photoshopped image just for example. I should be able to mouse hover lines and highlight text on mouse clicks. Do I need to add html tags to display text and highlight? Here...
by purplex88
Wed Dec 11, 2019 2:17 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Re: Control for text display, highlight and scroll

Thanks. I am looking at wxWebView. It seems like a complete web browser. I am not using wxListCtrl because its a paragraph oriented text, yes. Any hints on which functions I will need to paste text into wxWebView and highlight particular lines with mouse clicks? For starters, I need just basic funct...
by purplex88
Wed Dec 11, 2019 2:51 am
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 1112

Control for text display, highlight and scroll

I am looking for a control that will be able to load large scrollable text (e.g. say, 25 MB).

The text doesn't have to be editable, but just viewable.

I also need to highlight the lines in text on mouse clicks.

Which control will be a suitable choice?
by purplex88
Tue Jun 11, 2019 7:44 am
Forum: Compiler / Linking / IDE Related
Topic: Build for Visual Studio 2019
Replies: 20
Views: 2015

Re: Build for Visual Studio 2019

Note that I mean WIN32 not _WIN32. What is WIN32 for? I found this in minimal build :P