First time here? Check out the FAQ!
1

is it possible to show custom HTML contents in a Wing tab?
 

I need this capability in Wing Personal I would like to write an extension script that loads my own custom "help" from HTML pages from my menu

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
steve1964's avatar
114
steve1964
asked 3 years ago
Wingware Support's avatar
4.2k
Wingware Support
updated 3 years ago

Comments

see more comments

2 Answers

0

You can open an .html file and see the source, but Wing currently cannot render html as a web page.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.2k
Wingware Support
answered 3 years ago
link

Comments

Thanks, but the Wing Help submenus like "Wing Manual" or "Tutorial" are doing so. They open a tab and show HTML rendered pages. Are they special cases?

steve1964's avatar steve1964 (3 years ago)

Wing uses a qt QTextBrowser widget for its help documentation, which renders a limited subset of html. Wing's scripting support (in Wing Pro but not Wing Personal) does not directly support rendering other documentation, but it would be possible to display a QTextBrowser with a bit of work.

Wingware Support's avatar Wingware Support (3 years ago)

I have control on the kind of HTML to display, it's not for generic browsing. So a way to exploit the QTextBrowser widget would be fine for me. But does this imply some code changes on your side or is it something I can do by myself from the scripting API?

steve1964's avatar steve1964 (3 years ago)
see more comments
0

It's possible to do this if you go beyond the scripting API, but not easy. We may end up needing to make some changes so it's easier. Note that it is not supported in Wing Personal.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Wingware Support's avatar
4.2k
Wingware Support
answered 3 years ago
link

Comments

The disabled example script scripts/pylintpanel.py illustrates how to add a tool and you could put a QTextBrowser in the panel. See https://wingware.com/doc/scripting for docs on scripting and extending Wing Pro.

Wingware Support's avatar Wingware Support (3 years ago)
see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)