472,789 Members | 1,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 1971
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
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
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
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
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
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
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
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
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
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
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.