Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a OpenSelectedItem event to the ListView #429 #440

Closed
wants to merge 15 commits into from
Closed

Added a OpenSelectedItem event to the ListView #429 #440

wants to merge 15 commits into from

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented May 17, 2020

No description provided.

@tig
Copy link
Collaborator

tig commented May 18, 2020

I've tested this with UI Catalog and it works wonderfully. Really nice work! Thanks.

@BDisp
Copy link
Collaborator Author

BDisp commented May 18, 2020

Usage example:

private static void ListView_OpenSelectedItem (object sender, EventArgs e)
{
	var item = ((ListView)sender).SelectedItem;
	var itemName = ((ListView)sender).Source.ToList ();
	MessageBox.Query (50, 7, "Selected Item is: ", $"{item}:{itemName[item]}", "Ok");
}

@BDisp
Copy link
Collaborator Author

BDisp commented May 19, 2020

In agreement and subscribing to what @tig mentioned in #447, I present the respective changes to the pending ListView PR. Now, by invoking any of these events, the desired values ​​in the 'e' argument can be obtained directly.

private static void ListView_SelectedChanged (object sender, ListViewItemEventArgs e)
{
	MessageBox.Query (50, 7, "Selected Item is: ", $"{e.Item}:{e.Value}", "Ok");
}

private static void ListView_OpenSelectedItem (object sender, ListViewItemEventArgs e)
{
	MessageBox.Query (50, 7, "Selected Item is: ", $"{e.Item}:{e.Value}", "Ok");
}

@tig tig linked an issue May 19, 2020 that may be closed by this pull request
@migueldeicaza
Copy link
Collaborator

I love the change - a conflict came up after some recent merges, can we fix this, and then merge?

@BDisp
Copy link
Collaborator Author

BDisp commented May 20, 2020

Ok after all the merges are done I'll fixes them.

tig and others added 10 commits May 20, 2020 20:48
* Revert "Drop NuGet restore"

This reverts commit 5c7a0d0.

* Revert "Revert "Drop NuGet restore""

This reverts commit 2dc5fce.

* terminal.sln

* there. That wasn't so hard

* fixed some cases where <inheritdoc/> should have been used

* fixed some cases where <inheritdoc/> should have been used
* add Ready event to Toplevel
* Updates screen on Unix window resizing.
…be invoked if mouseEvent.ButtonState == 0 && mouseEvent.EventFlags == 0. (#453)

* Prevents mouse all events, which perform any of the mouse events, to be invoked if mouseEvent.ButtonState == 0 && mouseEvent.EventFlags == 0.

* Prevents another View under the menu from being triggered after the button is pressed in the menu.
* key down/up support

* line endings?

* line endings

* KeyDown/Up support

* line endings

* line endings

* Revert "Drop NuGet restore"

This reverts commit 5c7a0d0.

* Revert "Revert "Drop NuGet restore""

This reverts commit 2dc5fce.

* updated demo

* defined styles

* Smarter StatusBar bottom tracking.

* Prepping for #376

* Oops.

* Fixed StatusBar 'snap to bottom'

* line endings

* Revert "Fixed StatusBar 'snap to bottom'"

This reverts commit 9a91c95.

* started UICatalog project

* Initial working POC.

* Fix newlines

* merge

* textalignment demo tweaks

* textalignment demo tweaks

* Unicode Menu Scenario

* not sure why this keeps changing

* re-added project to .sln file

* re-enabled status bar

* moved scenarios to dir

* building a dim and pos demo

* terminal.sln

* progress...barely

* fixed exit

* progress with some underlying fixes to Label

* added readme

* fixes build issue

* launch

* made default colors readable on Windows

* major UI Catalog upgrade

* added more demos and updated readme

* refactored and added more tests

* added ref to Issue #437

* added OnKeyUp support to Curses and Net drivers

* more tweaks - grab PR #438 first

* Added a OpenSelectedItem event to the ListView #429

* updates

* moved KeyUpHandler out of special ESC stuff

* more tweaks & improvements

* testing top window bug

* supported OpenSelectedItem

* lots of updates

* fixed regression, fixed #444

* better button scenario

* tweaks

* add Ready event to Toplevel

* dotfx .gitignroe

* ready for ready

* updated colors based on feedback; consolodated config code

* tweaked readme

* readme

* Added Editor demonstrating TextView

* Added Editor demonstrating TextView

* added hexeditor scenario

Co-authored-by: Miguel de Icaza <miguel@gnome.org>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
@BDisp BDisp closed this May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListView needs events
3 participants