Gambas Code Syntax Highlighting

Post

Posted
Rating:
#1 (In Topic #34)
Avatar
Administrator
sholzy is in the usergroup ‘unknown’

I can't find it. Where is it?

Gambas Code Syntax Highlighting.

Note: Post templates will not work properly while in the "WYSIWYG" editor. If wanting using a post template, please disable the "WYSIWYG" editor. To learn how to switch editors read the FAQ on Editors.

The old forum used a different way of providing Gambas code syntax highlighting that isn't available for our new website. We still have Gambas code syntax highlighting, but it uses a different tag, and it's a little more sophisticated.

You can play with the "Gambas Code Syntax Highlighting" in the Playground.

When creating a topic or post, you will see a section that says "Post Template". Click on the drop down box, select "Code syntax highlighting", and click the "Use" button. You can do this as many times as needed while creating your post.

post_topic_1.png


This will place the highlighting code into the editor box ready for your use.

post_topic_2.png



This is how the formatted code looks:

Code (gambas)

  1. Public Sub Form_Close() If bAllowClose Then Stop Event If bTrayIcon Then TrayIcon1_Click() Endif Endif End


One benefit to using this new syntax highlighting is, most of the keywords are links to the official Gambas Wiki Language Index, as you can see in the example code below. This can be very helpful to someone just learning Gambas when a more experienced member posts some code, the beginner can click the link and learn more about that keyword.

 

Last edit: by SiteDir


sholzy
Gambas One Site Director

To report bugs in the Gambas IDE:
Official Gambas Bug Tracker
Online now: No Back to the top
1 guest and 0 members have just viewed this.