Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Add View.Insert(View, int) and RemoveAt(int) methods

Open MihaMarkic opened this issue 6 years ago • 7 comments

I'd like to see View.Insert(View, int) and RemoveAt(int) methods, so the item at certain position can be added or removed. I can create a PR...

MihaMarkic avatar Jun 18 '18 10:06 MihaMarkic

Why?

For tab order?

tig avatar Jun 04 '20 04:06 tig

@tig I was creating React-ish approach to UI and hence need to deal with items at certain position.

MihaMarkic avatar Jun 04 '20 07:06 MihaMarkic

FYI https://github.com/MihaMarkic/SharpReact there is a sample against GUI

MihaMarkic avatar Jun 04 '20 07:06 MihaMarkic

@tig I was creating React-ish approach to UI and hence need to deal with items at certain position.

Sorry if I'm being dense, but when you say "position" do you mean screen position? Position in z-order? Or, position in the tab order?

tig avatar Jun 04 '20 14:06 tig

@tig I think I was referring to position in Views array (not UI). Does that make sense to you?

MihaMarkic avatar Jun 04 '20 14:06 MihaMarkic

It does, but what I don't understand is WHY.

Right now the order in the array matters for both tab order (focus) and z-order. I believe this is not a great design. I was curious if you had a user or API requirement that would help influence how we fix this.

tig avatar Jun 04 '20 15:06 tig

It matters if you want to have virtual array and target (GUI) array in sync.

MihaMarkic avatar Jun 05 '20 08:06 MihaMarkic

Closing as quite stale.

tig avatar Jan 04 '24 14:01 tig