473,396 Members | 2,011 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,396 software developers and data experts.

Text colors under buttons

I have a form with a panel. On the panel, I have dynamically created
labels with the backcolor of control.lightlight, with a width of 200
pixels. I then dynamically create buttons next to the labels, but at
about pixel position 75, so some of the label is under the button. My
problem is the button is not on top of the label - the back color of the
label is on top of the button.

I have tried panel.suspendlayout first, then resumelayout after
everything has been added, but that didn't work.

I am adding the text and buttons using:

panel.suspendlayout
loop to build text boxes
panel.controls.add(xtext)
end loop

loop to build buttons
panel.controls.add(xbutton)
end loop
panel.resumelayout

Any ideas?

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
4 1128
Hi Darin,

Right-click on the button in the Form Designer and select Bring to Front.

Regards,
Fergus
Nov 20 '05 #2
Hi again Darin,

Lol. Oops, you said <dynamically> created!

In which case use
ButtonX.BringToFront
or
LabelY.SendToBack
in your code.

Regards,
Fergus
Nov 20 '05 #3
* Darin <darin_nospam@nospamever> scripsit:
I have a form with a panel. On the panel, I have dynamically created
labels with the backcolor of control.lightlight, with a width of 200
pixels. I then dynamically create buttons next to the labels, but at
about pixel position 75, so some of the label is under the button. My
problem is the button is not on top of the label - the back color of the
label is on top of the button.

I have tried panel.suspendlayout first, then resumelayout after
everything has been added, but that didn't work.


Maybe you want to call the control's 'BringToFront' method to show it
in front of an other control.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Thanks. For some reason I never noticed that.

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5

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

Similar topics

2
by: dzeeq | last post by:
Hi, I wonder if it's possible to replace standard text on confirm-popup buttons from 'ok' and 'cancel' to some other captions. If not, is there a way to create quickly custom dialog, with only two...
4
by: Frank Hoek | last post by:
Hi, I try to create the following: 2 buttons next to each other, on a webpage button 1 makes (onClick) text 1 appear just beneath the button button 2 makes (onClick) text 2 appear just...
0
by: LeeB | last post by:
I have XP-Pro and VS.NET 2002. I developed some software (.aspx and .aspx.vb) on my machine. I got it to work. A game that displays an HTML table (with colors and images in the cells) and several...
1
by: Ben | last post by:
Hi all, enum Colors defined as: enum Colors{Red, Blue, Green}; I have a text file "colors.txt" with the following content, one per line: Red Blue Green.
2
by: Cliff Lane | last post by:
I have an application that allows the user to select fore and back ground colors for command buttons. I use the dialog to select the colors and store the value returned in the db as a string. For...
10
by: Michael B. Trausch | last post by:
Alright... I am attempting to find a way to parse ANSI text from a telnet application. However, I am experiencing a bit of trouble. What I want to do is have all ANSI sequences _removed_ from...
10
by: apparker | last post by:
I'm creating a new GUI for a program and it is for a medical exam. There are so many different things to ask someone during a history it wastes too much space to make checkboxes for everything so I...
4
iam_clint
by: iam_clint | last post by:
Heres some sample code I wrote up for you guys to use on making text effects <script> //TEXT EFFECTS CODE WRITTEN BY iam_clint! window.onload = doEffects; var speed = 15; //lower the number...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.