controls

Cells in gridview lose controls on RowUpdating event

I'm quite new to the C# combo with ASP.NET, so i'll try to be as clear as i can with my explanation. I'm using a GridView to display some columns and rows that reside in a database. This works excellent. Because i wanted to add columns dynamically out of a List of names. Let's say we have a list with 5 names in it, then it dynamically c...

Help setting focus on the parent

I have a simple situation (.NET2): a texbox1 on a UserControl1(or Form1). I want to unfocus(leave) the texbox when I click on the usercontrol/form(focus the usercontrol/form instead): I do the following on the UC/form: Protected Overrides Sub OnMouseClick _ (ByVal e As System.Windows.Forms.MouseEventArgs) MyB...

Need I remove controls after disposing them?

.NET 2 // dynamic textbox adding myTextBox = new TextBox(); this.Controls.Add(myTextBox); // ... some code, finally // dynamic textbox removing myTextBox.Dispose(); // this.Controls.Remove(myTextBox); ?? is this needed Little explanation Surely, if I Dispose a control I will not see it anymore, but anyway, will remain a "Nothing"...

removing dynamically created controls C#

I have a program that adds a series of "blips" to a graph. How do I have a button clear all of the "blips" that have been created with this code? PictureBox blip = new PictureBox(); blip.Location = new Point(blipHours, blipAltitude); blip.Size = new Size(6, 6); ...

can ChartArea gridlines be made invisible?

I'm using Microsoft Chart Controls to generate charts from text file data. I centainly won't object to specific answers ;) but mostly a yea or nay will steer me right. Can the chartarea gridlines, axis, etc be made invisible? Can the column chart type be made to hug the leftmost side of the chart area. thanks ...

Prism MVVM - Add child View to parent View without using Regions and Injection, just XAML

Hello, I'm fairly new to the Silverlight and the MVVM / Prism pattern so this may be a stupid question. I have a View which has custom controls within it. These custom controls are actually Views too and have ViewModels to drive them. Currently to add these 'child' Views to the View I'm using (see Fig.1) and then in the ViewModel I ha...

Windows Forms Top Property Bug

I am trying to populate a container with any number of controls that have the same height and width. I allow this container to be shrunk or grown by the user and the container will organize the controls so that it fits the most controls on one row as possible. Here is the code to organize it: int row = 0; int column = 0;...

Setting a custom control's aspect ratio

Is there a way, using XAML (and possibly Template Bindings) to keep a control's width in a certain proportion to its height? I would like for my control, at design time in Blend, to always scale evenly. ...

Reload Post data in onClick in asp.net

Code is simplified to make it clearer. The description I'm writing a custom control that uses Controls.Add() to add all of the sub control it wants. Say for example my control is called "lots_of_text_boxes" and I add a minimum number of text boxes and provide a button (Controls.Add(button)) that says "add new text box". The control...

I want my memory back! How can I truly dispose a control?

I have an application I am making that creates a large number of windows controls (buttons and labels etc). They are all being made dynamically through functions. The problem I'm having is, when I remove the controls and dispose them, they are not removed from memory. void loadALoadOfStuff() { while(tabControlToClear.Controls.Count ...

Need an alternative to ProgressBar control for player resource pools (Health, etc.) in a game

I'm trying to implement a basic Health/Stamina/Mana readout in a Windows Forms application, and my first approach was to use a ProgressBar control. However, I'm not fond of its visual representation in Aero (always green and too much distracting gloss animation), and I'm not quite ready to get into WPF development (which is, from what I ...

How do I sort a ControlCollection by TabIndex or ChildIndex etc.?

Sorting a flat ControlCollection by TabIndex in a container is straightforward. It's complicated, however, when you have to sort a hierarchical container because the controls are renumbered. So you get something list this: Control 0 Control 1 Control 2 Control 3 Control 4 Control 5 How would I sort this? ...

Any online resources for web control images?

I have found plenty of icons online, but have yet to find images for other types of controls except 1-off examples. For example - buttons, tabs, dropdown menus, sliders, table headers, panel headers, etc. I've found plenty of tutorials, but our attempts always look bad in comparison (particularly for buttons and tabs). Are there any f...

ASP.net Ajax tab container not appearing

I created new web project using VS 2008 with enabled Ajax template with C# and Framework 3.5. I added Ajax reference to the project and I can see all Ajax toolkit in my tool box. The problem that when I add tab container with Tab Panels then run the projects nothing appear on the browser and I tried few browsers. I'm including my code...

Graphics in ASP.Net (c#)

I need help with my latest asp.net project. It involves graphics. I need to draw a circle and have several lines going from the middle to the edge (radius). This is the part I know how to do. The next part is the part I don’t know how to do and would appreciate some advice. The users need the ability to grab the lines with their mouse an...

Winforms Wait to draw Until Controls Added

I am adding a couple hundred controls to a form and the form flickers until its done as it adds each control, is there anyway to stop this? ...

Help with dynamically added controls in .net

I'm stuck! I understand the page lifecycle and how i need to add the dynamic controls on page_init if I want to take advantage of viewstate. Also I know that I should try to avoid dynamic controls when possible. The dynamic controls are created depending on an object that is created from custom event arguments sent from a custom treev...

How can I Dynamically add (unknown type) controls to a form?

Hi i want to add controls to my form with a general method, something like this: void addcontrol(Type quien) { this.Controls.Add(new quien); } private void btnNewControl_Click(object sender, EventArgs e) { addcontrol(typeof(Button)); } is this possible? ...

App view feels like it's "LAGGING"

Most of the views in my app are UITableVlews inside a UIViewController. My App feels like it's lagging when trying to scroll through the tables. I was wondering (1.) if it is better to create the cell objects in the table view, or create them at runtime and add them to the cells subview? examples: - (UITableViewCell *)tableView:(UITabl...

duplicating asp.net controls

Hi just wondering if there is anyway that I could duplicate controls in a asp.net pages. So for example, currently for one of my pages, I have a panel at the top of the page with alot of controls in them ( eg next/previous buttons, labels, trees, etc). However I wanted to add the exact duplicate of this panel on the bottom of the page...