controls

How do I reset a .NET Windows Forms TextBox BackColor property?

The default behavior of property BackColor of a TextBox is as follows: when enabled, it is White (SystemColors.Window), when disabled it is Gray (not sure what SystemColor this is). If I change the BackColor property, the same color is used for both Enabled and Disabled. How do I reset the BackColor property (after it has been changed ...

What is the best way to manage Form state?

I'm developing a form in a C# .NET 2.0 application that contains complex logic regarding the state (enabled/disabled) of various controls on the form. (The design is a symptom of a business analyst's poor understanding of UI best practices.) What would be the best way to go about managing the "state" of the form? Normally, I've seen...

How to access data from html controls in asp.net

How do I access data from html in asp.net in the .cs (code behind) file? in .aspx page I have <tr> <td>Username:</td><td><input id="username" type="text" /></td> </tr> <tr> <td>Password:</td><td><input id="password" type="password" /></td> </tr> ...

Resizing a control in WPF.

I have a set of user controls in my wpf form and want to give ability to user to resize them. Whenever a user clicks on a control total 8 boundary rectangles should appear and then by dragging any of them, the user must be able to resize the control. Please help me on this. ...

WPF drag & drop between containers

I've got a container, say a Grid. It has two containers, say StackPanels. StackPanel #1 has some rectangles. What's the best way to enable a user to drag a rectangle and drop it in the StackPanel #2 (and have that rectangle be a child of StackPanel #2). I've got the drag bit sussed - the only thing that's unclear is whether to actual...

asp:to add web control in table cell of table control (web control ).

i have inserted a table web control in a panel.in that table 's cells i want to insert other user control like label, panel .i am not able to do that.is there any difference in normal table for layout and table web control.if it is.then how can i insert simple table in a panel. ...

TFlowPanel. Adding controls at run-time.

Hi Does anybody know how to add controls, say a TImage, to a TFlowPanel at runtime? Regards, Pieter ...

Cocoa : How to make a control invisible?

In my application I have some controls like NSButton and NSTextfield I want to turn invisible. I know I can do it n the Interface Builder but I need to do it in the code. I still haven't found the right message I need to send to the controls. ...

Flex collapsible field group control

Hi! I am trying to make a side panel in a Flex application that would hold a bunch of properties of a selected object. The number of properties may become huge, but they all fall into some certain categories. For that, I am looking for a flex control that would be like a collapsible field group. Or like an accordion that can have multi...

What winforms control should I use to display a table of search results returned from LINQ?

What control should I use when wanting to display a list of record information (Name, ID #, date)? It is about 5 small columns, and I'll have many rows returned. I'm using LINQ to grab the records I need from the database and have it currently in an IQueryable. Can anyone suggest what WinForms control I should be using in this case ...

Arranging dynamically created controls on a web form

Hi. I am a newbie if it comes to web site development. I would like to create a web form that would contain controls defined in an XML file. This means that I am going to read the XML file within the Page_Load function and dynamically create and name all controls as defined in the file. This seams to be very easy. I have, however, anot...

Eventing In Dynamic Controls

Hi guys, I've not worked with anything but simply controls for a year or two and so am a bit rusty and need some help. I want to allow a usder to create a product categories structure, with a parent child relationship which can be any depth. To thsi end I want to create a control to represent a level with a listbox to show the sectio...

How to get raw markup of child controls at runtime

I am trying to create an ASP.net server control for displaying formatted code, using this library: http://www.manoli.net/csharpformat/ Here's the trick: I want be able to express code blocks like this... <custom:CodeFormatter runat="server"> <asp:Label runat="server" ID="something" Text="my text" /> <asp:Image runat="server" ID="some...

Text is not visible in Textbox when focus is set

When I load my form the focus is set on first control which is textbox. the data is not fully visisble in the textbox. this problem happens to textbox only and when the focus is set on first time.if someboy know abt the solution then pls let me know. ...

Field Validation For An IP Address

I am trying to prevent a user from entering anything into a particular textbox aside from a number or a period in C#. The textbox is supposed to contain an IP address. I have it working such that non-numeric entries are prevented, however I can't seem to get it to allow a period to be entered. How might I accomplish this? private vo...

Manually coding MVC Views vs. asp:ServerControls

I barely got into ASP.Net webforms when MVC came out, and now I'm ready to try it out. But, I want to clarify something to be sure I understand the View coding in ASP.Net MVC... I've heard that you must hand-code all the HTML in the View layouts, and that you cannot use server controls for this. Now, I like the way you can use the asp:L...

New ASP.NET chart control not working on deployed website

I have deployed my website to an .net 2.0.50727 hosting, and the page with the chart control is not working. I think it may be because this .net version doesn't support the chart control or I have forgotten to upload some required assemblies. Anybody knows wich assemblies are the required? Does the chart control work with .net 2? I hav...

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 user control. My Questions are: How can I allow the user to then close one of the tabs ...

Add row to table at runtime

On one of our pages, we've got a table that has rows generated at runtime. I want to move the content of those rows out into their own control and set properties on it at runtime, in order to separate the presentation from the code-behind. But it's not working the way I'm expecting. If I have my row-like control inherit from UserContr...

3rd Party WinForm .NET Grid Controls

Anybody have any experience with 3rd Party WinForm .NET grid controls? Before I spend the afternoon downloading and trying out several of the grids and/or control packs, anybody have opinions on vendors? functionality? etc. Some of the ones I'll be looking at are: XCeed Grid Telerik Grid - Part of RadControls for WinForms ...