Search:
Namespaces
Discussions
.NET v1.1
Feedback
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
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com