.NETGURU
Controls updating
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolsvb' list.


Lasse Johansen
Hi all
I have been trying to make a custom control. What I wanted to make was a
menulist(maybe it is already made, but this development is only to increase
my knowledge, not to use the component). What I was trying to make is
whenever the mouse moves over an item in the menulist the item becomes
highlighted(just as if you are moving your mouse over a cell in a
table(webpages) and the cell is changing color). Whenever the user wants to
select something, he simply pushes the mouse over an item and an event will
be sent, which can be caught to see which one was clicked.

I divided this into 2 things:

1: A control having the complete list
2: Another control having 1: as a control, and a autoScroll set to true.
This does so whenever the full menulist(1:) is not shown(because of the size
of 2: is less than 1:), a scrollbar is shown. This is the one, the user can
use!

Everything seems to work fine. My problem is now when my control looses
focus(I think), e.g. when I push another button on the form. When I go back
to my own control, and pushes an item(even though this event is not
implemented yet), the control scrolls to the top of my control(which is
bad), and even worse, it misses to repaint the control. What can I have done
wrong...? Which methods are called, when you push your control, and how can
I prevent them for being called?

Thanks in advance

Lasse Johansen

Reply to this message...
 
    
Lasse Johansen
Found out that it scrolls to the top of 2: which is actually my problem...
how come is that?

Lasse Johansen

----- Original Message -----
From: "Lasse Johansen" <Click here to reveal e-mail address>
To: "aspngcontrolsvb" <Click here to reveal e-mail address>
Sent: Friday, June 28, 2002 12:29 PM
Subject: [aspngcontrolsvb] Controls updating

[Original message clipped]

Reply to this message...
 
    
Lasse Johansen
Ok... nobody answers, maybe because the question is unclear. That is why I
have tried to break it down, so now the example is very simple:

Start to make a new project by choosing Visual Basic Projects->Windows
Control Library

In this new project the size of the control(UserControl1) = 150, 150. You
then drag a normal listbox into it. You fill this listbox with 15 values,
and make the size of the listbox = 120,200. You will now see that the
listbox is bigger than the bounds of UserControl1. To compensate for that,
you set the AutoScroll = true of UserControl1. Build UserControl1.

In a new Project Visual Basic Projects->Windows Application you now add
UserControl1. You also add a button(Button1), so that will give you 2
controls(UserControl1 and Button1). Now try to build your app.

Scroll down, and select element 15 in your UserControl1. Then push the
button, and then push element 14 in your UserControl. You will now see that
when pushing the 14th element, the UserControl scrolls to the top.... WHY?

Thanks in advance

Lasse Johansen

----- Original Message -----
From: "Lasse Johansen" <Click here to reveal e-mail address>
To: "aspngcontrolsvb" <Click here to reveal e-mail address>
Sent: Friday, June 28, 2002 12:56 PM
Subject: [aspngcontrolsvb] Re: Controls updating

[Original message clipped]

Reply to this message...
 
    
Lasse Johansen
Haven't any had this problem????

Pleeeeasee help, i am stuck!

Lasse Johansen

----- Original Message -----
From: "Lasse Johansen" <Click here to reveal e-mail address>
To: "aspngcontrolsvb" <Click here to reveal e-mail address>
Sent: Saturday, June 29, 2002 7:03 PM
Subject: [aspngcontrolsvb] Re: Controls updating

[Original message clipped]

Reply to this message...
 
 
System.Web.UI.UserControl
System.Windows.Forms.UserControl




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification