Questions tagged [controls]

Use this tag for programming scenarios related to controls (interactive elements of the user interface).

A control is an interface element that a computer user interacts with.
Common controls include:

  1. Window A rectangle that represents a "window" into a document, form, or design area.

  2. Text box A box in which to enter text or numbers.

  3. Button An equivalent to a push-button as found on mechanical or electronic instruments.

  4. Hyperlink Text with some kind of indicator (usually underlining and/or color) that indicates that clicking it will take one to another screen or page.

  5. Drop-down list A list of items from which to select. The list normally only displays items when a special button or indicator is clicked.

  6. List box A GUI widget that allows the user to select one or more items from a list contained within a static, multiple line text box.

  7. Combo box A combination of a drop-down list or list box and a single-line textbox, allowing the user to either type a value directly into the control or choose from the list of existing options.

  8. Check box A box which indicates an "on" or "off" state via a check mark ☑ or a cross ☒. Sometimes can appear in an intermediate state (shaded or with a dash) to indicate mixed status of multiple objects.

  9. Radio button A button, similar to a check-box, except that only one item in a group can be selected. Its name comes from the mechanical push-button group on a car radio receiver. Selecting a new item from the group's buttons also deselects the previously selected button.

  10. Cycle button A button that cycles its content through two or more values, thus enabling selection of one from a group of items.

  11. Datagrid A spreadsheet-like grid that allows numbers or text to be entered in rows and columns.

  12. Slider A bar that allows users to make adjustments to a value or process throughout a range of allowed values.

8394 questions
19
votes
1 answer

Web Forms Model Binding: How to omit binding for not visible control?

I am using the new Model Binding feature for WebForms, with .NET Framework Version 4.5.1. What I hope to achieve is, to exclude some of the two-way bindings, based on some condtions. I very much like the (hopefully now famous) blog post series, by…
Marcel
  • 15,039
  • 20
  • 92
  • 150
19
votes
4 answers

How can I make visible an invisible control with jquery? (hide and show not work)

How can I change the visibility of a control with jQuery? I have a control that its visible property to false (not css). When I used show() function for it nothing happened, it seems that hide() and show() methods are for css set of a control, not…
SilverLight
  • 19,668
  • 65
  • 192
  • 300
19
votes
2 answers

WPF CollectionViewSource Multiple Views?

I've written a Custom WPF Control with search extension, let's name it MyControl. The Control is a descendent of an ItemsControl class. So I feed the the data source to it like this: The control itself uses protected override void…
theSpyCry
  • 12,073
  • 28
  • 96
  • 152
19
votes
6 answers

how to handle programmatically added button events? c#

I'm making a windows forms application using C#. I add buttons and other controls programmatically at run time. I'd like to know how to handle those buttons' click events?
jello
  • 211
  • 1
  • 2
  • 4
19
votes
6 answers

ASP.NET Custom Controls - Composites

Summary Hi All, OK, further into my adventures with custom controls... In summary, here is that I have learned of three main "classes" of custom controls. Please feel free to correct me if any of this is wrong! UserControls - Which inherit from…
Rob Cooper
  • 28,567
  • 26
  • 103
  • 142
19
votes
1 answer

Split button in .NET Winforms

I'm looking for a Split Button in .NET WinForms. The kind where one side is a button and the other side has a dropdown button. I see them used all over in windows, like in the Visual Studio Save As window, so I figured they've got to have the…
jamiegs
  • 1,761
  • 2
  • 15
  • 23
19
votes
3 answers

WPF ComboBox without drop-down button

I want a ComboBox which has no drop-down button but can still be opened when I click on the text in the ComboBox. Is this possible with a WPF ComboBox?
codymanix
  • 28,510
  • 21
  • 92
  • 151
18
votes
3 answers

Alternatives To The Treeview

In my opinion treeviews are overused, therefore I don't really care for them. Sometimes they're necessary but I can imagine that one could always find a good alternative to the standard treeview. What are some other innovative ways to display…
DL Redden
  • 578
  • 1
  • 5
  • 13
18
votes
4 answers

How to stop video playing in VideoView programmatically in android?

I am using VideoView for playing video,I would like to stop the playing video completely.Please help me on this for solving it.Thanks.
Karthik
  • 4,943
  • 19
  • 53
  • 86
18
votes
8 answers

Can you add child controls to a HtmlGenericControl?

I have a very simple operation where I try to add a HtmlGenericControl to another HtmlGenericControl : protected void Page_Load(object sender, EventArgs e) { HtmlGenericControl div = new HtmlGenericControl("div"); HtmlGenericControl p = new…
Petras
  • 4,686
  • 14
  • 57
  • 89
18
votes
1 answer

Color-picker for Windows Forms applications

Is there a built-in color-picker in Windows Forms?
Peter17
  • 3,052
  • 9
  • 47
  • 77
18
votes
7 answers

Removing Windows' ugly Selection marker thing from Splitter in SpitContainer Control

I have a SplitContainer control, and the Splitter in the middle is very ugly. By setting the BackColor of the SplitContainer to (insert color here), then setting the BackColor of Panel1 and Panel2 to white, I can have my splitter looking nice. But…
βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33
18
votes
8 answers

Genealogy Tree Control

I've been tasked (by my wife) with creating a program to allow her to track the family trees on both sides of our family. Does anyone know of a cost-effective (free) control to represent this type of information? What I'm looking for is a modified…
Jay Mooney
  • 2,208
  • 1
  • 19
  • 23
18
votes
8 answers

Where is the "aspNetDisabled" class defined and why does ASP.NET render an interfering duplicate CSS "class" attribute for it?

When I set the "Disabled" property of an ASP.NET TextBox control to false, the final rendered HTML textarea tag (sent to the browser) includes an 'class="aspNetDisabled"' attribute in addition to the 'disabled="disabled"' attribute. Where is the…
Triynko
  • 18,766
  • 21
  • 107
  • 173
18
votes
8 answers

How to implement a blinking label on a form

I have a form that displays queue of messages and number this messages can be changed. Really I want to blink label (queue length) when the number of messages were increased to improve form usability. Should I implement custom control and use…
garik
  • 5,669
  • 5
  • 30
  • 42