Search found 14294 matches

by doublemax
Thu Dec 12, 2019 12:11 am
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

The best you can possible do is to present a download button. You won't be able to write directly to the file system without user interaction. I need to go to bed now, so no more experiments from me for today ;) If you want to take a shot at it, these are some things that might help: https://www.w3s...
by doublemax
Wed Dec 11, 2019 11:58 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

I tried that. The hover effect worked, but not the "toggle marked text with click". Try to load it with Chrome. There it worked for me even from a local file. You might have to take a closer look at wxStyledTextCtrl. Unfortunately it's real pain to set up, it's badly documented and i've never used i...
by doublemax
Wed Dec 11, 2019 11:41 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

I built a small page with minimal CSS and JS. Unfortunately it works only properly when loaded from a "real" URL, not when loaded through a local file or SetPage(). Probably a security issue. So that seems to be a dead end. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="v...
by doublemax
Wed Dec 11, 2019 10:54 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

Editing is possible in priciple, but i don't know if it's possible to handle large amounts of text. https://www.w3schools.com/tags/tag_textarea.asp Saving is more difficult as the browser has no access to the local filesystem. And i don't know any way to transport large amounts of data back from the...
by doublemax
Wed Dec 11, 2019 9:34 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

The hover effect could be done with CSS alone. For the click handling you need JS. As this code has to be added to every single line of text, this might at least double the length of the text.

Did you already make a test how the control behaves with 25mb of text?
by doublemax
Wed Dec 11, 2019 8:35 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

Do I need to use JavaScript here for mouse hover actions on text and highlight? Text selection and copy/paste should work out of the box. For hover action you'll need either CSS or JS, depending on what you need. Can you explain? Can I disable horizontal scroll and do word wrap of text? Remove the ...
by doublemax
Wed Dec 11, 2019 7:57 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

Can you show the code where you create the webview control?
E.g. you should not pass "" as url when creating it. The default is "about:blank".

It's also possible that you need to wait for the wxEVT_WEBVIEW_LOADED event and set the new page from there.
by doublemax
Wed Dec 11, 2019 6:20 pm
Forum: Platform Related Issues
Topic: Win 8 toolbar toggle is awfully funny looking (checker background, etc.)
Replies: 6
Views: 133

Re: Win 8 toolbar toggle is awfully funny looking (checker background, etc.)

Here two screenshots with the resize issue:
mm3d_1.png
mm3d_1.png (16.81 KiB) Viewed 82 times
mm3d_2.png
mm3d_2.png (13.9 KiB) Viewed 82 times
While resizing it switches quickly between the black and the correct redraw. If i had to guess i'd say it depends on whether the dimensions of the indiviual panels are odd or even numbers.
by doublemax
Wed Dec 11, 2019 5:39 pm
Forum: Compiler / Linking / IDE Related
Topic: [SOLVED] A boatload of errors
Replies: 4
Views: 95

Re: A boatload of errors

The libraries for tiff, jpeg are missing in the linker settings.

I don't know C:B too well, but this should help:
viewtopic.php?f=19&t=46125
by doublemax
Wed Dec 11, 2019 5:37 pm
Forum: C++ Development
Topic: Proper sizing at start problem.
Replies: 8
Views: 90

Re: Proper sizing at start problem.

First thing to try is to call SendSizeEvent() on the toplevel window:
https://docs.wxwidgets.org/trunk/classw ... 5fa82ba4c2
by doublemax
Wed Dec 11, 2019 5:27 pm
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

Yes, it is a webbrowser. And as such much better optimized to display large amounts of text than any other control. That's why i suggested it. In the most simple form, you just call wxWebView::SetPage() with a basic html page. <html><body><pre> your text here </pre></body></html> ny hints on which f...
by doublemax
Wed Dec 11, 2019 6:28 am
Forum: C++ Development
Topic: Control for text display, highlight and scroll
Replies: 27
Views: 213

Re: Control for text display, highlight and scroll

I would try wxStyledTextCtrl or wxWebView.
by doublemax
Wed Dec 11, 2019 6:18 am
Forum: Platform Related Issues
Topic: Win 8 toolbar toggle is awfully funny looking (checker background, etc.)
Replies: 6
Views: 133

Re: Win 8 toolbar toggle is awfully funny looking (checker background, etc.)

Do you mean the dark grey background of the icons? As the title bar is black and the grey is the same color as the menu bar, i assume the user is using a very unusual color theme. Here's what it looks on a "normal" Windows 8.1, seems ok to me: w81screen.png (There are some redraw problems when resiz...
by doublemax
Tue Dec 10, 2019 5:04 pm
Forum: C++ Development
Topic: wxStyledTextCtrl Looses events when inside panel
Replies: 3
Views: 58

Re: wxStyledTextCtrl Looses events when inside panel

Is the wxAuiNotebook part mandatory for this to happen? Or does it also happen if you put the wxSTC in any wxPanel?