473,505 Members | 14,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange z-order behavior

Hi group I've got a usercontrol containing a textbox and alongside the
textbox there's a combobox. I draw this control on top of a grid. So when
the user clicks certain columns in the grid the control appears at the right
place. This all works just fine except the z-order, at the beginning my
usercontrol contained 2 comboboxes and the z-order was ok. But as I said
before now it's a textbox and a combobox and since I've changed one of the
combo's to a textbox there are strange things happening. The first time the
control is drawn, everything is fine, when I click a next row in my grid the
textbox in my usercontrol seems to get a sendtoback and the combo stays fine
in front of the grid. If I then give an other app the focus and go back to
my app the textbox is fine again. Now I've tried putting
textbox.bringtofront at all kinds of places, I also changed the order at
which the combo and textbox get added to my usercontrol:
Me.Controls.Add(Me.cboCode)
Me.Controls.Add(Me.txtCode)
I also deleted and readded the textbox
but no effect at all.
I find it very strange because when my usercontrol is drawn on the grid i
can see the gridline is drawn where the textbox should be drawn and it stops
where the combobox begins but there should be no gridline visible at all
where my usercontrol is drawn because it's drawn over the gridline.
Thanks in advance for any hints or tips

Greetz Peter
Nov 21 '05 #1
1 2012
Just to let now I found the answer, I forgot to set myusercontrol.visble =
false at the usercontrol leave event and apparently that was causing it.

Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.
"Peter Proost" <pp*****@nospam.hotmail.com> schreef in bericht
news:#i**************@TK2MSFTNGP15.phx.gbl...
Hi group I've got a usercontrol containing a textbox and alongside the
textbox there's a combobox. I draw this control on top of a grid. So when
the user clicks certain columns in the grid the control appears at the right place. This all works just fine except the z-order, at the beginning my
usercontrol contained 2 comboboxes and the z-order was ok. But as I said
before now it's a textbox and a combobox and since I've changed one of the
combo's to a textbox there are strange things happening. The first time the control is drawn, everything is fine, when I click a next row in my grid the textbox in my usercontrol seems to get a sendtoback and the combo stays fine in front of the grid. If I then give an other app the focus and go back to
my app the textbox is fine again. Now I've tried putting
textbox.bringtofront at all kinds of places, I also changed the order at
which the combo and textbox get added to my usercontrol:
Me.Controls.Add(Me.cboCode)
Me.Controls.Add(Me.txtCode)
I also deleted and readded the textbox
but no effect at all.
I find it very strange because when my usercontrol is drawn on the grid i
can see the gridline is drawn where the textbox should be drawn and it stops where the combobox begins but there should be no gridline visible at all
where my usercontrol is drawn because it's drawn over the gridline.
Thanks in advance for any hints or tips

Greetz Peter

Nov 21 '05 #2

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

Similar topics

2
1794
by: Arthur | last post by:
I've come across some strange xml, that I need to deal with, it looks like this:- <root> <foo attr="1">Some random strange text. <bar attr="2">blar</bar> <bar attr="3">blar blar</bar> <bar...
2
1949
by: Paul Drummond | last post by:
Hi all, I am developing software for Linux Redhat9 and I have noticed some very strange behaviour when throwing exceptions within a shared library. All our exceptions are derived from...
2
8909
by: Olaf | last post by:
I have a frameset page witch contains the myFuc() function. The function is accessed from a page in one of the frames in the frameset. An example is shown below. <input...
7
1651
by: M O J O | last post by:
Hi, I'm developing a asp.net application and ran into a strange css problem. I want all my links to have a dashed underline and when they are hovered, it must change to a solid line. Sounds...
25
3696
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
0
1372
by: David Pratt | last post by:
Hi. I am creating a couple of small methods to help me manage time from UTC as standard but I am getting strange results. If I start with a datetime of 2005-12-12 14:30:00 in timezone...
11
2568
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
9
1929
by: Me | last post by:
Hi, I ran into a malloc problem but I can't find the solution. I try to read a file into a variable with malloc like this: BYTE *lcdata; lcdata = malloc(fsize*sizeof(BYTE));
20
1648
by: SpreadTooThin | last post by:
I have a list and I need to do a custom sort on it... for example: a = #Although not necessarily in order def cmp(i,j): #to be defined in this thread. a.sort(cmp) print a
14
3283
by: blumen | last post by:
Hi all, I'm a newbie in VB.Net Programming.. Hope that some of you can help me to solve this.. I'm working out to read,parse and save textfile into SQL Server. The textfile contains thousands...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.