473,383 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

UserControl Invalidate Problem

I have created a usercontrol consisted of a linkLabel and textBox. textBox
visible set to false initially. When I click on linkLabel linkClicked event
fired which set textBox visible to true.

I have added this usercontrol to a form1, however when I click on the
linkLabel of the usercontrol the textBox doesn't show up as expected, even
thou the linkClicked event was fired properly.

I have also added the line "this.invalidate()" at the last line of the
linkClicked event, which seems to do nothing.

Anyone who feel generous enough to enlight me please?
Feb 3 '08 #1
1 1899
On Sat, 02 Feb 2008 22:51:01 -0800, Newbro
<Ne****@discussions.microsoft.comwrote:
I have created a usercontrol consisted of a linkLabel and textBox.
textBox
visible set to false initially. When I click on linkLabel linkClicked
event
fired which set textBox visible to true.

I have added this usercontrol to a form1, however when I click on the
linkLabel of the usercontrol the textBox doesn't show up as expected,
even
thou the linkClicked event was fired properly.
I suspect you are somehow setting the Visible property on the wrong
control.

The above described behavior works fine when I write a sample program to
do it. I click on the LinkLabel and the TextBox appears, just as intended.

So, you have likely not written the code correctly. However, there's no
way for anyone to offer a suggestion as to what you might have done wrong,
since you didn't post any code.

You should post a concise-but-complete sample of code that reliably
reproduces the problem. Without that, it's not possible to offer any
specific advice.

Pete
Feb 3 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mark Johnson | last post by:
Using: VS 2003 NET C# for Framework and Framework Compact Trying : Moving a Card (Bitmap) as in Solitare (PC + WinCe) Version on OnMouseMove Problem : The affected drawing Area by Invalidate (or...
0
by: lc | last post by:
I use a series of UserControl that get dynamically created and (all) docked (fill) on one form panel. Problem is that I have to call UserControl.BringToFront() more than once to get it to show....
8
by: Tinus | last post by:
Hello all, I've create a custom control (UserControl) and have a custom Item Collection. The control is a custom calendar which is draw using the Graphics Rectangle etc. functions. It is drawn...
4
by: steve bull | last post by:
I have created a UserControl and added it to my toolbox. It appears in the toolbox with the icon I created for it. The problem is that when I drag the control onto a form no code is generated. If I...
0
by: JR | last post by:
Hi, i found a user control on the net see code below it is part of VSEssential but I like the coolProgressBar. Zo I want to use it into my program and I always get the error that it can't find...
1
by: Executor | last post by:
Hi you all, I have created a usercontrol with a filledEllipses on a filledRectangle, using this Paint event: private void myControl_Paint(object sender, System.Windows.Forms.PaintEventArgs e)...
4
by: Sugan | last post by:
Hi all, I've created a Custom button control and i'm drawing the graphics for the button when the paint event is fired. I used Invalidate method to redraw the graphics in events like mousemove,...
4
by: grayaii | last post by:
Hi, I have a simple form that handles all its paint functionality like so: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); And the entry point to this...
0
by: raylopez99 | last post by:
Hi, I'm getting into GDI+ Forms 2.0 graphics for C#3 using Visual Studio 2008. One thing I notice: the graphics are really slow and flicker on a Pentium IV, with 2 GB RAM, even with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.