wxStyledTextCtrl keyword lists
Posted: Tue Sep 08, 2020 9:57 am
I am using a wxStyledTextCtrl window for JavaScript source code. Using wxFormBuilder, I have set the window style to C++ and provided my own list of JavaScript keywords thus:
where keywordsSupported and keywordsUnsupported are lists of JavaScript keywords. These words get displayed in blue.
All this works well for me.
I note that the SetKeyWords method allows for different sets of keywords, as specified in its first parameter. The above example uses set 0.
I would like to be able to use different colours for different sets of keywords. For example, I could use a different colour for keywordsUnsupported.
Can anyone show me how to utilise different sets of keywords and display them differently?
Thanks
Code: Select all
pane->SetKeyWords(0, keywordsSupported + keywordsUnsupported);
All this works well for me.
I note that the SetKeyWords method allows for different sets of keywords, as specified in its first parameter. The above example uses set 0.
I would like to be able to use different colours for different sets of keywords. For example, I could use a different colour for keywordsUnsupported.
Can anyone show me how to utilise different sets of keywords and display them differently?
Thanks