Label,TextBox,Asp.net - c#

I have a label and a text box associated to it . I have added some text in text box which is invisible at first... now I want to display the content after I go On the label...

If you are using an HTML label rather than an ASP label, you can use the onmouseover event. From within this event, you can then turn on/off the visibility of the text.

If you want to show one textbox after typing something in another, you can use the javascript onBlur() event to show it.

using jquery it can be:
$("#MyLabel").mouseover(function(){
$("#MyTextBox").attr("visible","true");
});

Related

Devexpress Winforms tileview substring text forecolor

Is it possible to change the forecolor of substring in element text in GridControls's Tileview in devexpress winforms?
What's going to happen is I have a textbox and tileview
In event while textbox textchanged fire, the text matched in tileview's element text will be highlighted
The initial color of tileview's text will be blue and if its match with textbox's text it will be highlighted as gray.
See picture to check the illustration:
Is it possible? or will i need another component to attain this output?
As far I can see there is property group called Appearance (TileView.Appearance) and there you have property called ForeColor. Moreover, you can acces via code by calling
titleViewName.Appearance.ForeColor = <RGB value goes here>
Finally, there is possibility for dynamic customization via event ItemCustomize.
For further information please check official documentation and DevExpress forum. There already existis questions similiar to yours.
You can try to use HTML Text formating for displayed string:
Text = "This is some <color=red>red or <color=black><b>bold</b> text!"

Can I change radiobutton control's visibility

In given below Image I am showing radio button ,Can i remove arrow shown circle of radio button ,is it possible ? I need to show on radio button's image and text ,not its sign , I know i can use any other control like button or label, but Actually I have done all coding using radio button ,and now design of form got changed ,and now i don't want to change whole my code again , so is their any trick to solve this issue ?
You can use the Appearance property like this:
radioButton1.Appearance = Appearance.Button;

Create hyperlink in TextBox control

Is there some way that I could create a hyperlink within a Textbox control? The catch: I would like only certain text to act as a hyperlink. For example, StackOverflow.com allows me to make only THIS text act as a hyperlink. Is there some way to do this in C# from withing a Textbox?
Use a RichEditCtrl. Does the text need to be editable? Otherwise you could use Labels and Hyperlinks in a StackPanel.

Labels and events!

I have a question? How can I wire up an button in a winform to take an input from a label, and put it in a text box to display the result?
I'm confused!
I have 4 labels... I want to be able to have people put input into the labels click the update button, and then display the results in the textbox below.
Any help? Thank you!
OK so basic outline of what you need to do:
1) Go to the toolbox and put textbox(es) on the form for the user to type in.
2) Add at least one label for your output text
3) Add a Button
4) Select each item on the form, go to its properties (f4) and set the Name property for each one to something that you can remember (this is how you'll reference the controls in your code)
5) Double click on the submit button. This will open up an "Event Handler" for Button.Click, which means the code you write will run when someone clicks the button.
6) Write the C# code to do what you want. For instance, this takes the contents of a textbox (tbInput.Text) and copies it to the label text (lblOutput.Text):
lblOutput.Text = tbInput.Text;
Hope this helps...if not, read the first 3 or 4 chapters of any beginning C# book.
You don't put input input into label, you do that in a TextBox. A label is a as its name implies a "label" (fixed unmodifiable text).
Most simply, create a method to handle the Click event of the button, bind it in.
Inside this method get the text from the labels, and then update the textbox with the input.
.NET standard Labels are not the controls you are looking for. Labels are just that...text labels that do not provide for text input. What you want is a TextBox, which you will be able to find in the Visual Studio Toolbox.
If you want the look and feel of a Label, but the functionality of a TextBox, you can modify the TextBox properties accordingly (border style, background color, etc).
Drop a Button onto your form, and from the Designer if you double-click the button, a _Click event handler will be generated in your source file from which you can implement the code to do whatever it is you want to do.

Disable check/uncheck CheckBox after clicking checkbox`s label

How can I disable standard behaviour when choosing checkbox`s label. Now when I click on label checkbox change its state.
Thanks
you could have a check box with no text and then a label next to it.
You could wrap this up in a user control / control to make things a little neater.
This is inherent behavior. You can pass empty string as label text and put a label beside checkbox. Or you can create composite control with Checkbox with empty text and a label with the text intended for checkbox's label.

Categories