Hi, all.
Short version: I have a scrollable Panel (Panel1) containing numerous Userforms that scrolls back to the top after a UserForm at it’s bottom is refreshed/updated. I want it to stay where it was - with the selected UserForm in view. Any/all help greatly appreciated. Thanks!
Details: I’m teaching myself VB.Net (Visual Studio 2010). Previous experience with VB6, so I’m familiar with a lot of the language, but not great with OOP and the .Net framework (yet). Anyway, I’m creating an employee scheduler – Panel1 contains an array(20,7) of UserForm1. UserForm1 contains various info about an employee’s shift, and also fires a ‘Double_Clicked’ event whenever it is double-clicked. For each UserForm, I used AddHandler to point each UserForm’s Double_Clicked event to a single ‘Box_Double_Clicked’ procedure, passing only the object that fired the event. Box_Double_Clicked parses the UserForm’s unique number, and performs action(s) against the UserForm and/or the entire app, depending on which UserForm is double-clicked. So – for example, when the user scrolls to the bottom of the panel, double-clicks a UserForm in the bottom row(s), after the UserForm is updated, the panel scrolls back to the top, and I need it to stay wherever it was before the double-click. The only info I’ve found was setting/restoring Panel1.Scrollbar.AutoScrollPosition, but I couldn’t get that to work.
I’m sure I’ve violated a ton of standards, and surely there’s a better way to go about this. But, it’s trial & error learning, and it’s still just a hobby, for now, and I love it. Hopefully I described what I’m doing well enough. Anyway, can anyone offer guidance? Thanks !
-J.D.
Scrollable Panel scrolls back to top
Page 1 of 13 Replies - 155 Views - Last Post: 21 January 2013 - 03:36 PM
Replies To: Scrollable Panel scrolls back to top
#2
Re: Scrollable Panel scrolls back to top
Posted 20 January 2013 - 08:26 PM
Instead of a having a multi-dimension array you could use Entity Framework - not only is it a database model it make database look and feel like OOP - classes and properties. And isn't that what you want in scheduler - a database?
#3
Re: Scrollable Panel scrolls back to top
Posted 21 January 2013 - 03:27 AM
Thanks for the reply. No idea about Entity Framework - I'll look into it after work today. Any other suggestions, anyone?
#4
Re: Scrollable Panel scrolls back to top
Posted 21 January 2013 - 03:36 PM
Solved - in case it helps anyone out there:
Userform.Select
Like I said, newbie....
Userform.Select
Like I said, newbie....
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|