• DocumentationSections
    • Forum
    • Market
    • Signals
    • Freelance
    • Quotes
    • WebTerminal
    • Calendar
    • VPS
    • Articles
    • CodeBase
    • Documentation
    • About
  • Log in
  • Create an account
  • English
  • Русский
  • 中文
  • Español
  • Português
  • 日本語
  • Deutsch
  • 한국어
  • Français
  • Italiano
  • Türkçe
...
    MQL5 ReferenceStandard LibraryCustom GraphicsCCanvasTextWidth 
    • Attach
    • Arc
    • Pie
    • FillPolygon
    • FillEllipse
    • GetDefaultColor
    • ChartObjectName
    • Circle
    • CircleAA
    • CircleWu
    • Create
    • CreateBitmap
    • CreateBitmapLabel
    • Destroy
    • Ellipse
    • EllipseAA
    • EllipseWu
    • Erase
    • Fill
    • FillCircle
    • FillRectangle
    • FillTriangle
    • FontAngleGet
    • FontAngleSet
    • FontFlagsGet
    • FontFlagsSet
    • FontGet
    • FontNameGet
    • FontNameSet
    • FontSet
    • FontSizeGet
    • FontSizeSet
    • Height
    • Line
    • LineAA
    • LineWu
    • LineHorizontal
    • LineVertical
    • LineStyleSet
    • LineThick
    • LineThickVertical
    • LineThickHorizontal
    • LoadFromFile
    • PixelGet
    • PixelSet
    • PixelSetAA
    • Polygon
    • PolygonAA
    • PolygonWu
    • PolygonThick
    • PolygonSmooth
    • Polyline
    • PolylineSmooth
    • PolylineThick
    • PolylineWu
    • PolylineAA
    • Rectangle
    • Resize
    • ResourceName
    • TextHeight
    • TextOut
    • TextSize
    • TextWidth
    • TransparentLevelSet
    • Triangle
    • TriangleAA
    • TriangleWu
    • Update
    • Width

    TextWidth

    Receives the text width.

    int  TextWidth(
       const string  text      // text
       );

    Parameters

    text

    [in]  Text for measuring.

    Return Value

    text height in pixels

    Note

    The current font is used to measure the text.

    TextSize
    TransparentLevelSet
    • MQL5.community
      • Online trading / WebTerminal
      • Free technical indicators and robots
      • Articles about programming and trading
      • Order trading robots on the Freelance
      • Market of Expert Advisors and applications
      • Follow forex signals
      • Low latency forex VPS
      • Traders forum
      • Trading blogs
      • Charts
    • MetaTrader 5
      • MetaTrader 5 Trading Platform
      • MetaTrader 5 latest updates
      • News, implementations and technology
      • MetaTrader 5 User Manual
      • MQL5 language of trading strategies
      • MQL5 Cloud Network
      • End-to-End Analytics
      • Download MetaTrader 5
      • Install Platform
      • Uninstall Platform
    • Website
      • About
      • Timeline
      • Terms and Conditions
      • Recurring Payment Agreement
      • Agency Agreement – Offer
      • Privacy and Data Protection Policy
      • Cookies Policy
      • Contacts and requests
    • MetaTrader 5
      Scan to install from App Store
      Scan to install from Google Play
      Scan to install from Huawei AppGallery
      Scan to get Android APK file
      MQL5 Channels
      Scan to install from App Store
      Scan to install from Google Play
      Scan to install from Huawei AppGallery
      Scan to get Android APK file
      Economic Calendar
      Scan to install from App Store
      Scan to install from Google Play
      Scan to install from Huawei AppGallery
      Scan to get Android APK file
      Not a broker, no real trading accounts
      35 Dodekanisou str, Germasogeia, 4043, Limassol, Cyprus
      Copyright 2000-2023, MetaQuotes Ltd