Questions tagged [terminal.gui]

Terminal.Gui is a library created by Miguel De Icaza. It's intended to create console-based applications using C#. The framework has been designed to make it easy to write applications that will work on monochrome terminals, as well as modern color terminals with mouse support.

You can find documentation in Terminal.Gui API Overview. NuGet Package is here.

10 questions
9
votes
3 answers

How to add an event Action handler in PowerShell

Terminal.Gui (gui.cs) provides a Button class with a Clicked event defined as: public event Action Clicked; I'm trying to write a sample app for Terminal.Gui in PowerShell and am struggling to get an event handler wired up. Add-Type…
tig
  • 3,424
  • 3
  • 32
  • 65
2
votes
1 answer

Set TextView.Text from asynchronous function

Using Terminal.Gui I'm trying to set a TextView's text from a asynchronous function, I can do it in C# just fine from a task but not from a Powershell Job, there might be a PS concept I'm missing here. TextView tv = new TextView(); Task.Run(()…
dragonmost
  • 43
  • 6
1
vote
1 answer

How can one dockerize a Terminal Gui application to run on Linux

I have created a terminal app in C# .NET 6 using Terminal Gui. I have dockerized it but for some reason every time i run the container it keeps exiting with 139, after looking at the logs it initially mentioned that it was missing libncursew.so.5/6…
Egli Becerra
  • 961
  • 1
  • 13
  • 25
1
vote
1 answer

Terminal.Gui keeping text within bounds

I'm using the terminal.gui library for c#. The text currently runs off the edge of the frame, but I want it to start a new line when it reaches the edge. Here is my code (frame 1 code not inlcuded since its not relevant): …
j. doe
  • 21
  • 3
1
vote
1 answer

What is the correct way to refresh the UI after changing a ListView in Terminal.GUI (gui.cs)?

I am using gui.cs. I have a ListView that shows network nodes. These nodes come and go so the list gets updated on the right events. var clients = new List(); var clientList = new ListView(clients) { Height = Dim.Fill(), Width =…
Mara09
  • 65
  • 6
1
vote
0 answers

Forcing xUnit tests to run as a console app

My project (Terminal.Gui) makes extensive use of console APIs (it is a 'console GUI framework'). When our unit tests run (either in VS or with dotnet test) they run in an environment where the console APIs don't work. For example, the Win32…
tig
  • 3,424
  • 3
  • 32
  • 65
1
vote
0 answers

How to Install-Package a pre-release nuget package?

This package: https://www.nuget.org/packages/Terminal.Gui/1.0.0-pre.5 Find-Package shows the pre-release versions if I use -AllowPrereleaseVersions. PS> Find-Package -Name Terminal.Gui -AllowPrereleaseVersions -AllVersions Name …
tig
  • 3,424
  • 3
  • 32
  • 65
0
votes
1 answer

Terminal.Gui when leaving charracter are still generated on Linux

I wrote a small Console program using .NET 5 and the Terminal.Gui library from Miguel de Icaza. When I run it on Windows, everything works well. I published it as an autonomous single file for Linux and I run it on an Ubuntu 20.04 LTS as a WSL 1 in…
JPBlanc
  • 70,406
  • 17
  • 130
  • 175
0
votes
1 answer

C# Cant find object reference when using terminal.gui

Ive been playing around with some server/client stuff and though id try using terminal.gui, and for some reason that i dont understand its acting up. i have 2 scripts; one to handle the backend stuff and one to handle the user…
Asperix
  • 3
  • 2
-1
votes
1 answer

Terminal.Gui c# - Is any way to convert Dim to int?

I use Terminal.Gui library: https://github.com/migueldeicaza/gui.cs Is it possible to convert Dim to int? For example: Window win = new Window("name") { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill() }; int width = (int)win.Width;…
Stami
  • 43
  • 5