Auto-Select Value in Nevron.UI.WinForm.Controls.NNumericUpDown on Enter?


Auto-Select Value in Nevron.UI.WinForm.Controls.NNumericUpDown on...
Author
Message
Miles Thornton
Miles Thornton
Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)
Group: Forum Members
Posts: 17, Visits: 1

I have a data-entry Winforms app exclusively using the Nevron.UI.WinForm.Controls.  However, there are a couple of things I need to ask about...

Is there an existing way to:

1. Auto-Select the entire Value in Nevron.UI.WinForm.Controls, specifically a NNumericUpDown, during the OnEnter event? This would allow the user to simply key the new value without having to manually delete the existing value - saving keystrokes and time...

2. Filter a CheckListBox.Items collection as the user Types into the display field? I have rather large picklists and the Filter-as-you-type feature would really help me out...

Thank You!


Reply
Miles Thornton
Miles Thornton
Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)
Group: Forum Members
Posts: 17, Visits: 1

Angel,

Thank you very much for the help! Your suggestion for my question #1 was SPOT ON! I have a number of NNumericUpDown components, so:

private void nnud_Enter(object sender, EventArgs e)

{

int length = ((Nevron.UI.WinForm.Controls.NNumericUpDown)sender).Text.Length;

((Nevron.UI.WinForm.Controls.NNumericUpDown)sender).Select(0, length);

}

As for my question #2...

Suppose I have a NComboBox with 1000 pre-populated Items. I would like to have the control pare-down the list of available choices as the user types into the .Text property...

IE: Unfiltered list contains 1000 elements; user types into the text property, the control limits (hides) elements that do not match what the user types:

So, the Items list has 100 elements starting with "CFL ..."

50 elements starting with "CFLL"

10 elements starting with "CFLL-01"

The user has pared-down his 1000 choices to a mere 10 by typing 7 characters; see the advantage?

I suppose that I could catch the TextChanged event and iterate the list comparing the first <Text.Length> characters of each NListBoxItemText to the users input to toggle each NListBoxItem.Visible - If such a property existed...

Anyway; that's the functionality I need. I realize now that I could do this with multiple in-memory NListBoxItem[] - To restore the list, etc...

I hope that this post is much more clear about what I was talking about - I do apologize for being unclear!

Thanks again,

-Miles

 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search