From WikiChip
Difference between revisions of "mirc/identifiers/$width"
< mirc‎ | identifiers

(Created page with "{{mirc title|$width Identifier}}'''$width''' returns the width of text in pixel in the specified font. == Synopsis == <pre>$width(text,font,size,B,C)</pre> == Parameters ==...")
 
(Parameters)
Line 9: Line 9:
 
* '''font''' - The name of the font
 
* '''font''' - The name of the font
 
* '''size''' - The size of the font, you can specify a negative value to match the size of fonts in the font dialog
 
* '''size''' - The size of the font, you can specify a negative value to match the size of fonts in the font dialog
* '''B''' - Optional, pass a non-zero value to specify a bold font
+
* '''B''' - Optional, pass a non-zero value to specify a bold font (can be a $true/$false value)
* '''C''' - Optional, pass a non zero value to get control code to be processed
+
* '''C''' - Optional, pass a non zero value to get control code to be processed (can be a $true/$false value)
  
 
== Properties ==
 
== Properties ==

Revision as of 19:18, 7 January 2018

$width returns the width of text in pixel in the specified font.


Synopsis

$width(text,font,size,B,C)

Parameters

  • text - The text you want the width of
  • font - The name of the font
  • size - The size of the font, you can specify a negative value to match the size of fonts in the font dialog
  • B - Optional, pass a non-zero value to specify a bold font (can be a $true/$false value)
  • C - Optional, pass a non zero value to get control code to be processed (can be a $true/$false value)

Properties

None

Example

//echo -a $width(test,verdana,15)

Compatibility

Added: mIRC v5.31
Added on: 04 Jan 1998
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also

$height