473,385 Members | 1,347 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,385 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 1127
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...
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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.