Rich Comments

In this chapter we are going to learn how to add comments to our programs

PWCT support rich comments where we can mix between text, colors, lines, and images

Also we can tables use HTML code

Using the Header Component

In the begining, No steps exist in our Steps Tree

1.png

We will select the (Header) component

2.png

In the interaction page we will set the text to (Welcome to Programming!)

3.png

Now, we see this comment added to our Steps Tree

4.png

Using the New Line Component

We will select the (New Line) component

5.png

From the Interaction Page, we will select (Draw Line)

6.png

Now we see the Line is added to the Steps Tree

7.png

Using the Comment Component

We will select the (Comment) component

8.png

In the text section we will write (My first program using PWCT!)

9.png

The comment is added to the Steps Tree

10.png

Using the Image Component

Time to add an image using the (Image) component

11.png

We will type the image file, width & height

The image exist in a relative path (images folder)

The images folder exist in the same folder as our visual source file (program2.pwct)

12.png

Now we see the Image is added to our Steps Tree

13.png

Printing some text

We can use the (Print Text) component

14.png

Set the text to (I Love Programming!)

15.png

The Print step is added to the Steps Tree

16.png

Now we can run the program and see the output in the Output Window

17.png