473,803 Members | 3,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Label placed on button, disappears when clicked

I have created a LABEL, and placed it on top of a button.
When I press the button, the label disappears under the button.
Is there a way to get the LABEL to stay on top of the button,
or reappear after the button is clicked ? I need the Label to remain
an object seperate from the button.

Greg
Sep 28 '08 #1
2 4999
Please note that the label I have placed on top of the button is much
smaller
than the button, and only displays a small symbol. There must be a
way to bring the label back on top of the button, once the button
loses focus. Some code that
will bring the label to the front again ?

Greg
On Sep 28, 7:28*pm, "Greg (code...@gmail. com)" <code...@gmail. com>
wrote:
I have created a LABEL, and placed it on top of a button.
When I press the button, the label disappears under the button.
Is there a way to get the LABEL to stay on top of the button,
or reappear after the button is clicked ? *I need the Label to remain
an object seperate from the button.

Greg
Sep 28 '08 #2
My Work Around:

Instead of a Label, I used a text box to simulate my label. TextBox1
I set the textbox control source = "X" '(so that the X symbol I
wanted would be displayed)
I set the textbox locked to Yes
I placed the textbox over my Button (Command1)

Under the On_Click event of the button (Command1)
Me.TextBox1.Set Focus 'Reveal the textbox again
Me.Command2.Set Focus 'Keep focus off the button

After the button is clicked, the OnClick event restores focus to the
TextBox1 causing it
to show on top of the button. Then I put focus somewhere else, other
than the button I just
pressed, because if the button has focus then the label on top will go
underneath.
Greg
Sep 29 '08 #3

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

Similar topics

1
5450
by: Antonio Barros | last post by:
Hi I'm trying to put the popup effect that happens in a button on a label. This property (FlatStyle.Popup) is too a label property. I made test windows form program, and i just put one button and one label. I modified the FlatStyle of both to Popup. When i run the program and i pass the mouseover the button i see the effect functioning. On the label no. Why ?
0
1098
by: | last post by:
hi, selected items in check box disappears when submit button is clicked on aspx page. check box is pasted on .ascx page and which is pasted on aspx page any ideals cheers sam
8
2486
by: BillZondlo | last post by:
How come when I put the label text setting here: /// The main entry point for the application. /// </summary> static void Main() { Application.Run(new Form1()); } private void LoadInfo()
2
587
by: Dot net work | last post by:
Hello. I have an aspx page that changes an HTML label's text using javascript. After the label's text has been changed in this way, I redirect to another aspx page. If I then use the back button on the browser, the label has lost it's newly changed value.
3
1853
by: Dustan | last post by:
I have a Button object that gets replaced by a Label when clicked. Button(buttonsframe,text=' ',command=c,font=buttonsFont) Note that the text is a single space. buttonsFont uses 'Courier New' as a family. When clicked, the Button is destroyed and replaced with a Label object: Label(buttonsframe,text=x,font=buttonsFont,relief=RAISED) The intent is for the Label object to look identical to the button
9
3195
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.).
3
1813
by: John | last post by:
In my app I've created a label report (Avery 7162, 2 colums, 8 rows) with the wizzard. The report is based on a temp table that is created when the user pushes a button. After creation of the table the pushbutton opens the report. Now something weird happens. When I open the report manually a few or more times it remains intact. However, when I open the report from the form's pushbutton code for the first time, the report will open OK....
5
6872
by: Susan Bricker | last post by:
I have a command button that I'd like to make "disappear" after being clicked and after the OnClick function has executed. I have tried changing the 'visible' attribute to false while within the OnClick function but that won't work because the button control has the focus. I traced and put a trap at the top of form_current but it didn't hit there. Any suggestions?
1
1961
by: karthik25 | last post by:
Hi, The following code creates a tab container, 5 tab panels, buttons, labels. I was able to add event handlers to the button. But how am i supposed to access the dynamically created labels? For example how do i get the text of the label changed when the corresponding button is clicked? I have given the complete code below. Please help me with this. using System; using System.Collections; using System.Configuration; using System.Data;...
0
9703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10316
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7604
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6842
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.