question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example ? Change text and parametrs

See original GitHub issue

void Update() { textView.Text = textNew += “demo \n”; textView.Redraw(textView.Bounds); textView.SetNeedsDisplay();//.ChildNeedsDisplay(); // textView.Redraw(new Rect()); }

` public void Awake() { Terminal.Gui.Application.Init();

        var top = Terminal.Gui.Application.Top;

        // Creates the top-level window to show
        var win = new Window("Server Menu")
        {
            X = 0,
            Y = 1, // Leave one row for the toplevel menu

            // By using Dim.Fill(), it will automatically resize without manual intervention
            Width = Dim.Fill(),
            Height = Dim.Fill(),
        };

        top.Add(win);
        
        // Creates a menubar, the item "New" has a help menu.
        var menu = new MenuBar(new MenuBarItem[] {
        new MenuBarItem ("_File", new MenuItem [] {
            new MenuItem ("_New", "Creates new file", null),
            new MenuItem ("_Close", "", Terminal.Gui.Application.RequestStop),
            new MenuItem ("_Quit", "", Application.Quit)
        }),
        new MenuBarItem ("_Edit", new MenuItem [] {
            new MenuItem ("_Copy", "", null),
            new MenuItem ("C_ut", "", null),
            new MenuItem ("_Paste", "", null)
        })
    });

        top.Add(menu);

        textView = new TextView()
        {
            Text = textNew,
            ReadOnly = true,
            Height = Dim.Percent(20),
        };
        top.Add(textView);

        var login = new Label($"Login: ") { X = 3, Y = 2 };
        var password = new Label("Password: ")
        {
            X = Pos.Left(login),
            Y = Pos.Top(login) + 1
        };
        var loginText = new TextField("")
        {
            X = Pos.Right(password),
            Y = Pos.Top(login),
            Width = 40
        };
        var passText = new TextField("")
        {
            Secret = true,
            X = Pos.Left(loginText),
            Y = Pos.Top(password),
            Width = Dim.Width(loginText)
        };

        // Add some controls, 
        win.Add(
            // The ones with my favorite layout system
            login, password, loginText, passText,

                // The ones laid out like an australopithecus, with absolute positions:
                new CheckBox(3, 6, "Remember me"),
                new RadioGroup(3, 8, new[] { "_Personal", "_Company" }),
                new Button(3, 14, "Ok"),
                new Button(10, 14, "Cancel"),
                new Label(3, 18, "Press F9 or ESC plus 9 to activate the menubar"));

        Terminal.Gui.Application.Run();
    }

`

How correct update UI ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nurbatcommented, Nov 25, 2019

@BDisp Thanks, it works. I 'll try to add ScrollView to it now.

0reactions
tigcommented, Jun 4, 2020

No bug here. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I use a parameter to change HTML text?
How can I use a parameter to change HTML text? ... const SneaksAPI = require('sneaks-api'); const sneaks = new SneaksAPI(); //getProducts(keyword, ...
Read more >
Adding a Parameter that will change text in a formula
Solved: I have a formula that creates a column based on a user-inputted date. I want to make it easier for someone to...
Read more >
Change label text value based on parameter
Hi,. I'm displaying a calculated field in a worksheet. I have the label text as follows: label.png. So from the above image, "Avg...
Read more >
Change Text Case of Parameter Value | Dynamo - YouTube
... Dynamo Beginner Topic: How to change Text Case of parameter value using dynamo Summary: The script discussed in this tutorial converts ...
Read more >
Replace Part of Text
Replaces part of a text with new content based on a starting position and the number of characters set by the user. Syntax....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found