Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

IAS – TextBox – How do I get a textbox to grow vertically depending on the text inside it?

465 views28th June 2024automation scripts IAS IAS Toolkit UIBlockType
7
Rui Camacho [SLC] [DevOps Member]111 27th June 2024 0 Comments

I'm trying to get my TextBox to grow up to take the full Vertical space of the cell if necessary.
I tried:

- Setting Vertical Aligment to Stretch.

Everything else requires me to set a fixed Height which is not what I want.

Current config:

TextBoxMarkdown = new TextBox();
TextBoxMarkdown.IsMultiline = true;
TextBoxMarkdown.IsEnabled = false;
TextBoxMarkdown.Width = 600;

AddWidget(TextBoxMarkdown, 1, 1, HorizontalAlignment.Center, VerticalAlignment.Stretch);

When text is filled in:

dialog.TextBoxMarkdown.IsEnabled = true;
dialog.TextBoxMarkdown.Text = sb.ToString();

Looking forward to the replies

Carlos Matheus [SLC] [DevOps Advocate] Answered question 28th June 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Carlos Matheus [SLC] [DevOps Advocate]318 Posted 28th June 2024 0 Comments

Hi Rui,

There is a method in the Widget Class that allows resizing the box based on the content: SetHeightAuto(). The only problem, as far as I know, is that the TextBox cannot dynamically detect the size of the text. This means that if you write something and trigger an action using the "Changed" event, it will resize the TextBox even if the text is shorter than the TextBox size.

Method SetHeightAuto | DataMiner Docs

Here is an example of how the TextBox will resize after the text changes. Remember that the TextBox does not take into account the size of the text, so it will resize anyway after an event (e.g., clicking out of the TextBox):

dialog.TextBoxMarkdown.Changed += (sender,args) => dialog.TextBoxMarkdown.SetHeightAuto()

I know this doesn't solve the issue, but it might be something helpful that you can play around with!

Hope it helps!

Carlos Matheus [SLC] [DevOps Advocate] Answered question 28th June 2024
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin