Libraries‎ > ‎Library‎ > ‎Interface gadgets‎ > ‎

Create text

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Add some text to the NetLogo interface.

End description

Create text

Begin NetLogo code:

substitute-text-area-for upper-left-corner-x 5    
substitute-text-area-for upper-left-corner-y 250 
substitute-text-area-for lower-right-corner-x 80   
substitute-text-area-for lower-right-corner-y 300 
substitute-text-area-for font-size 11 
substitute-text-area-for text-color-number 0  
substitute-text-area-for transparent-background true  
substitute-text-area-for text-initial-lines "line 1" "line 2" "final line"                                                                   
  "upper-left-corner-x" "upper-left-corner-y" ; upper left corner (from the upper left corner of the applet) 
  "lower-right-corner-x" "lower-right-corner-y" ; lower right corner
  "font-size" ; font size
  "text-color-number" ; text color number
  "transparent-background" ; transparent background (true or false)
  text-initial-lines ; lines of text quoted and separated by spaces

End NetLogo code


All the text area parameters can be changed. You can enter as many lines of text as you wish. You can specify other font sizes or colours or make the background transparent.

How this works

This creates a NetLogo text area using the Behaviour Composer's create-color-text which creates the text area at load time and it can't be removed.

Related micro-behaviours


Create text was implemented by Ken Kahnon 19 December 2009.

BehaviourComposer: ignore everything after this.