Skip to content

Commit 527983a

Browse files
author
tznind
committed
Update to latest and switch relative to to drop down list
1 parent bc3e949 commit 527983a

9 files changed

Lines changed: 102 additions & 30 deletions

File tree

Showcase/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static void Main(string[] args)
3636

3737
tv.Accepted += (s, e) =>
3838
{
39-
var row = tv.Value.Cursor.Y;
39+
var row = tv.Value.SelectedCell.Y;
4040
if (row >= 0 && row < types.Length)
4141
{
4242
var toCreate = types[row];

Showcase/Showcase.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Terminal.Gui" Version="2.0.2-develop.10 " />
12+
<PackageReference Include="Terminal.Gui" Version="2.0.2-develop.40 " />
1313
</ItemGroup>
1414

1515
</Project>

Showcase/Text.Designer.cs

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Showcase/Text.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
//------------------------------------------------------------------------------
3+
4+
// <auto-generated>
5+
// This code was generated by:
6+
// TerminalGuiDesigner v2.0.2.0
7+
// You can make changes to this file and they will not be overwritten when saving.
8+
// </auto-generated>
9+
// -----------------------------------------------------------------------------
10+
namespace Showcase {
11+
using Terminal.Gui;
12+
13+
14+
public partial class Text {
15+
16+
public Text() {
17+
InitializeComponent();
18+
}
19+
}
20+
}

src/Design.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ public IEnumerable<IOperation> GetExtraOperations(Mouse? mouse = null)
319319
}
320320

321321
// if no column was right clicked then provide commands for the selected column
322-
if (col == null && tv.Value != null && tv.Value.Cursor.X >= 0)
322+
if (col == null && tv.Value != null && tv.Value.SelectedCell.X >= 0)
323323
{
324-
col = dt.Columns[tv.Value.Cursor.X];
324+
col = dt.Columns[tv.Value.SelectedCell.X];
325325
}
326326

327327
yield return new AddColumnOperation(App, this, null);

src/TerminalGuiDesigner.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageOutputPath>./nupkg</PackageOutputPath>
2121
<ImplicitUsings>enable</ImplicitUsings>
2222
<PackageId>TerminalGuiDesigner</PackageId>
23-
<Version>2.0.2-develop.10</Version>
23+
<Version>2.0.2-develop.40</Version>
2424
<Authors>Thomas Nind</Authors>
2525
<Nullable>enable</Nullable>
2626
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@@ -165,7 +165,7 @@
165165
<PackageReference Include="Serilog" Version="4.2.0" />
166166
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.0" />
167167
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
168-
<PackageReference Include="Terminal.Gui" Version="2.0.2-develop.10" />
168+
<PackageReference Include="Terminal.Gui" Version="2.0.2-develop.40" />
169169
<PackageReference Include="nlog" Version="5.3.3" />
170170
<PackageReference Include="Basic.Reference.Assemblies.Net100" Version="1.7.7" />
171171
<PackageReference Include="System.CodeDom" Version="10.0.0" />

src/UI/Windows/KeyBindingsUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public KeyBindingsUI(IApplication app, KeyMap keyMap) {
6464
tableView.KeyBindings.Add(Key.Enter, new KeyBinding([Command.Activate]));
6565
tableView.Activating += (s, e) =>
6666
{
67-
var prop = _props[tableView.Value.Cursor.Y];
67+
var prop = _props[tableView.Value.SelectedCell.Y];
6868
var k = Modals.GetShortcut(app);
6969
prop.SetValue(this.keyMap,k.ToString());
7070
this.SetNeedsDraw();

src/UI/Windows/PosEditor.Designer.cs

Lines changed: 6 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UI/Windows/PosEditor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,8 @@ public PosEditor(IApplication app, Design design, Pos oldValue) {
6969
d=>d.FieldName,
7070
d=>d);
7171

72-
tbRelativeTo.Autocomplete.SuggestionGenerator = new SingleWordSuggestionGenerator()
73-
{
74-
AllSuggestions = _siblings.Keys.OrderBy(a => a).ToList()
75-
};
72+
tbRelativeTo.Source = new Terminal.Gui.Views.ListWrapper<string>(
73+
new System.Collections.ObjectModel.ObservableCollection<string>(_siblings.Keys.OrderBy(a => a).ToList()));
7674

7775
var val = oldValue;
7876
if(val.GetPosType(_siblings.Values.ToList(),

0 commit comments

Comments
 (0)