wxStyledTextCtrl for HTML + CSS + JS 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.
Post Reply
User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 60
Joined: Thu Nov 16, 2017 9:32 pm

wxStyledTextCtrl for HTML + CSS + JS

Post by saifcoder » Sun Nov 17, 2019 12:33 am

Is possible to coloris keywords of multiple language in the same time ? (I mean without clear style or create new object)

HTML + CSS

Code: Select all

// Set Lexer to HTML
MyStyledTextCtrl->SetLexer(wxSTC_LEX_HTML);
// HTML Tags
obj_CODE->StyleSetForeground (wxSTC_H_TAG,...
// CSS Tags
obj_CODE->StyleSetForeground (wxSTC_CSS_TAG,...
The problem is we need to change lexer to wxSTC_LEX_CSS to coloris CSS code, so we lose HTML colorization!
Debian 9 - GCC 6 - wxWidgets 3.1 U
Win 7 - GCC 5 - wxWidgets 3.1 U
Mac OS X 10.6 - GCC 4 - wxWidgets 3.1 U
i am in love with WX. Yes.

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 313
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: wxStyledTextCtrl for HTML + CSS + JS

Post by New Pagodi » Sun Nov 17, 2019 5:02 am

Sorry, no lexer currently supports this. There was a recent discussion on the Scintilla list about this very question.

User avatar
saifcoder
Experienced Solver
Experienced Solver
Posts: 60
Joined: Thu Nov 16, 2017 9:32 pm

Re: wxStyledTextCtrl for HTML + CSS + JS

Post by saifcoder » Sun Nov 17, 2019 5:21 pm

got you, so I need to wait for the next version, or I will try adding new lexer!

Thank you,
Debian 9 - GCC 6 - wxWidgets 3.1 U
Win 7 - GCC 5 - wxWidgets 3.1 U
Mac OS X 10.6 - GCC 4 - wxWidgets 3.1 U
i am in love with WX. Yes.

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2276
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania
Contact:

Re: wxStyledTextCtrl for HTML + CSS + JS

Post by evstevemd » Sun Nov 17, 2019 5:36 pm

Hi,
New Pagodi wrote:
Sun Nov 17, 2019 5:02 am
Sorry, no lexer currently supports this. There was a recent discussion on the Scintilla list about this very question.
I have not tried the suggested Lua Lexer. Have anyone tried it yet? How will it difficult (in case anyone knows that) to incorporate it to wxSTC?
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]

Post Reply