textstyle

Modified on Mon, Oct 30, 2023 at 11:06 AM

Blocks Function: 

textstyle

Displays one row text box with optional Font, Size, Colour or Colour Picker.
DescriptionDisplays one row text box with optional Font dropdown list, Size dropdown list, colour dropdown list or colour picker.
Important: The block has to be a textflow type or embedded inside a textflow block.
Reference[font][size][color][settings][notextbox]
or
[font][size][colorpicker][settings][notextbox]
Value Syntax

[font fontname1:default,fontname2,fontname3,...]

[size size1,size2:default,size3,...]

[color colorname1:pdflibcolor1:webcolor1:default,colorname2:pdflibcolor2:webcolor2], or
[colorpicker colormode:colorpreset:defaultcolor:noicon]

[settings textboxwidth:fontdropdownlistwidth:sizedropdownlistwidth:colordropdownlistwidth:designmode(1 or 2)]

[notextbox] to hide the textbox. Used for styling other blocks.

For Defaults use: [font][size][color]or[colorpicker] without parameters.
Only one colour method is allowed, if both are added then the colorpicker will be used.

The styling dropdown lists and color picker are optional. To not add any styling option, simply enter none as the value. It is recommended not to use the command in this case.

Separators^Record Separator
:Value Separator
Examples
1[font][size][color]
Use the default set for fonts, sizes and colours
2[font Helvetica:default,Arial,Verdana,Blast][size 10,12:default,14,18][color black:{gray 1}:#000000, red:{rgb 1 0 0 }:#FF0000:default, Cyan:{cmyk 1 0 0 0}:#00FFFF]
Set Helvetica as the default font, 12pt as the default size and red as the default colour.
font parametersA list of font names as used in the block file. All fonts, except for Host and Built-in, should be added to the fonts force load section.
font Examples
1[font]
Use the default set of fonts
2[font Helvetica:default,Arial,Verdana,Blast]
Four fonts are added with Helvetica being the default. Blast font need to be force loaded as it is not a host or built-in font
size parametersA list of font sizes separated by commas. A default keyword can added to any size preceded by a colon to make that size the default.
size Examples
1[size]
Use the default set of sizes (pt)
2[size 9,10:default,12,14,18,20]
10 is the default
color parametersA list of color information separated by commas. The first part is the color name. The second part is the color as define in PDFLib.
The third part is a web color. The fourth part is optional and can appear one to specify a default.
size Examples
1[size]
Use the default set of sizes (pt)
2[size 9,10:default,12,14,18,20]
10 is the default

color parameters



color Examples

1
[color]
Use the default set of colours
2
[color black:{gray 1}:#000000, red:{rgb 1 0 0 }:#FF0000:default, Cyan:{cmyk 1 0 0 0}:#00FFFF]
black is the name that will appear to the user, {gray 1} is the PDFLib representation of the colour. #000000 or simply black is the web reference

Reference

[font][size][color][colorpicker][settings]

colorpicker parameters

The options for the colorpicker are: mode:preset:default:noicon


Mode Options: all(default) - hsb - rgbsliders - webpalette

Preset Options: Apex - Aspect - Civic - Concourse - Default - Equity - Flow Foundry - Grayscale
- Median - Metro - Module - None - Office Opulent - Oriel - Origin - Paper - ReallyWebSafe
- Solstice - Standard(default) - Technic - Trek - Urban - Verve - Web216

Default Color: black

colorpicker Examples

1
[colorpicker]
Use the default set of colours
2
[colorpicker all:standard:black:icon]
the last option is either icon to display an icon for the color picker or noicon to display the full colorpicker

Reference

[font][size][color][colorpicker][settings]

settings parameters

The options for settings are:
textbox width (pixels):font dropdown list width (pixels):size dropdown list width (pixels):
color dropdown list width (pixels):designmode(1 or 2(default))

settings Examples

1
[settings]
Use the defaults, can be omitted.
2
[settings 200:100:50:50:2]
width of the textbox: 200 pixels
width of the font dropdown list: 100 pixels,
width of the size dropdown list: 50 pixels,
width of the color dropdown list: 50 pixels,
2 for displaying the control in two lines

Screen Shots

Colorpicker expanded:


Color dropdown list and text box on the same line:

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article