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
21
votes
4 answers

PointerPressed not working on left click

Creating Metro (Microsoft UI) app for Windows 8 on WPF+C#, I met difficulty with PointerPressed event on a button. Event doesn't happen when i perform left-click (by mouse), but it happens in case with right-click or tap. So what's wrong with that…
xkillah
  • 641
  • 5
  • 11
21
votes
3 answers

Right click menu under winforms

I want to make a right click menu for my winforms app. It will have the same two things in it no matter where it pops up. A little hunting and pecking leads me to the conclusion that winforsm either doesn't support this in a trivial way or has…
BCS
  • 75,627
  • 68
  • 187
  • 294
20
votes
10 answers

What is the best way to connect remotely to a Mac?

I'm trying to remotely control a Macintosh computer. I know that in the Windows world, you can use Remote Desktop to connect from one Windows computer to another Windows computer. This works relatively well. I know that you can use a VNC server…
mac mike
20
votes
3 answers

Can I make the maximum value of a NumericUpDown control unlimited instead of specifying a value in its Maximum property?

As the title says, is there a way to make the maximum value of a NumericUpDown control unlimited instead of having to specify a specific value its the Maximum property?
Jonhston Hirsh
20
votes
3 answers

Where to find free open sourced android custom controls?

I'm looking for some site/library/project with advanced custom Android controls? if you know one, are they free and open sourced?
Ante
  • 8,567
  • 17
  • 58
  • 70
20
votes
8 answers

Implementation of IsPostBack in page load

The more I use ASP.NET, the more if (!IsPostBack) {} seems pointless... First example: For example, I just Googled an issue, they said use this as part of the solution: if (!Page.IsPostBack) { Page.LoadComplete += new…
Yerg
  • 277
  • 1
  • 3
  • 8
20
votes
3 answers

Adding Custom Controls dll to Visual Studio ToolBox

I have a custom control DLL. How can I add these custom controls to VS2008 tool box programatically?
malli
  • 201
  • 1
  • 2
  • 3
20
votes
7 answers

What is LiteralControl? Why is it used?

What is a LiteralControl? I was reading about LiteralContols but I am not sure why they are used. I used this code to list the controls in a page and - I have a page which has a label and a button. When I use this foreach (Control control in…
pavanred
  • 12,717
  • 14
  • 53
  • 59
20
votes
2 answers

How do I "hide" controls that my control uses from the toolbox?

I have developed a control in C#. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up…
Pat O
  • 1,344
  • 3
  • 12
  • 27
19
votes
7 answers

Customizing a TabControl for the Closing of Individual Tabs

My scenario is the following: I am working on a winforms application in C# that has a button inside the main page of a tabcontrol that will generate another tabpage each time that it is clicked. Each new tabpage will contain a layout defined by a…
THE DOCTOR
  • 4,399
  • 10
  • 43
  • 64
19
votes
2 answers

Android fragments vs compound controls

Why should Android 3.0 fragments be used instead of compound controls? One can create a View inheritor or compound control once and use it everywhere. I've read http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html but did not…
Anton
  • 1,903
  • 3
  • 16
  • 18
19
votes
4 answers

WPF RichTextBox Performance

WPF's RichTextBox control's performance is real slow when a 50KB text document is loaded. Scrolling laggy and pressing Ctrl-A to select all the text takes more than 10 seconds. (This is intantaneous on Notepad). I'm not doing any fancy bitmap…
moogs
  • 8,122
  • 8
  • 44
  • 60
19
votes
3 answers

ASP.NET MVC doesn't work with ViewState and Postback?

Perhaps this is a naive question. In my understanding, ASP.NET MVC cannot work with ViewState and Postback which is fundamentals of ASP.NET forms. Is that correct? If that's it, then all ASP.NET Web Controls depending on ViewState & Postback cannot…
Morgan Cheng
  • 73,950
  • 66
  • 171
  • 230
19
votes
1 answer

Pass click event of child control to the parent control

I have a Windows form, having a pane, which contains another class, derived from Windows Forms. This is contained as a control within the pane. It contains two buttons within itself. I'd like the events of the child control to be passed all the way…
user1173240
  • 1,455
  • 2
  • 23
  • 50
19
votes
4 answers

A good WPF scrolling timeline control? (fancy datetime picker)

I'm looking for somthing I can use as a timeline control. A kind of "banner" the user can drag to the left or the right to go forward or backwards in time and then he or she should be able to select a point in time on that control. A fancy datetime…
TimothyP
  • 21,178
  • 26
  • 94
  • 142