controls

What's the common ancestor of visual elements in C#?

I have a hard time believing that there isn't an answer here but it certainly looks like it doesn't exist. I am trying to iterate over everything on the form and set the visible and enabled properties based on the tag value. I find the reek of an absolutely duplicated routine between the routine iterating the controls and the routine i...

is there a loop controlled by time in c++?

Hi, I am wondering if I can loop x times in one minute interval between each loop. for (int x = 10; x > 0; x--) { cout << "BOOM" << endl; } Is there any way I can print boom every one minute? Or there is a better way to do this? Thank you ...

Dynamically Loading Controls and Persistence in ASP.NET

I am loading a series of controls in the Page_Load event. However, I have to recreate those controls each page load, which means storing their data elsewhere. This is cumbersome. protected void Page_Load(object sender, EventArgs e) { MyControl control = (MyControl)LoadControl(...); control.Initialize(GlobalClass.controlData); ...

When do you use If (!IsPostBack) in ASP.NET?

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 EventHandler(Page_LoadComplete); } Which does exactly as coded, LoadComplete will only fire on the first load. A...

ASP.NET Life-cycle Dichotomy: Dynamically Added Controls and Events

The situation: I have user controls with buttons that have hooked events. Controls with events need to be initialized in Page_Load or earlier. I wish to spawn these user controls dynamically by clicking an Add button. It is important to remember that events, such as click events, are not fired until just before Page_LoadComplete. Br...

Android Calendar "Grid of Dates"

I am looking for an Android open source Calendar control which displays the full month in a grid, much like a real printed-on-paper calendar. It's for an app to show special days. Like this from my iPhone version we are porting: ...

Is there an event in Delphi that fires when ActiveControl changes?

I would like to run a small routine whenever the ActiveControl changes. How can I do this? I thought about having a timer that checks the active control at certain intervals, and fires my routine when it changes, but is there a more elegant solution? ...

Trying to figure out how to dynamically update attributes of ASP controls dynamically?

In my aspx page, I have a number of drop down controls. I would like to update an attribute on each of the controls with "class=leftColumn" with the following line: propertyID.Attributes["nameOfAttribute"] = "false"; But instead of manually writing out each controlID and setting its attribute with the line above, I had hoped there wa...

Dynamic drag/droppable 3 deep nested control

Hi all. I have (what I think is) a unique problem to solve, but a solvable one, written in C# .Net3.5 in VS2008. I want to have a group of classed inheriting from parent class 1. a Collection of controls, controls to be stipulated by child classes and assumed different for each, 2. Another control of some sort this controls are to be...

Efficient Declaration/Creation of variables/controls.

I'm working on cleaning up an app I'm almost finished with and I noticed something that made me curious as to why it's being done that way. While you can edit the .Designer.cs in your project for a form, there is a lot of autogenerated stuff in there, such as the creation of variables and controls. They have the Windows Form Designer g...

Add A New Property To A Third Party Control

I am working with dev ex controls and on a menu bar item there isnt a property for setting the button to Visible or not Not Visible. Can you add properties like this to pre made controls? If so how would you do it? ...

Custom WPF EndLineCap, StartLineCap & LineJoin or new attached properties

Just wondering if anyone knows how I would implement additional/custom EndLineCap, StartLineCap & LineJoin attributes? In short, LineJoin="Round" is what I want but I need both sides of the angle are smooth - instead of just the wider angled side. Also, instead of just Rounded EndLineCap and StartLineCap I want a ball on each end (for...

Owner draw TextBox for use in WinForms

I need a lean & mean TextBox solution. A RichTextBox proves too slow, so I want to go the way of owner drawing, or custom control building. My need is for a textbox that can handle large text content and offers simple highlighting by drawing colored backgrounds around words or single characters. Important is, that the text string itself...

Best way to show huge text in WPF?

I need to show a really huge amount of text data in my piece of code - first i tried to use TextBox (and of course it was too slow in rendering). Now i'm using FlowDocumentView - and its awesome but recently i have had another request - text shouldnt be hyphenated. Well actually it is not ( document.IsHyphenationEnabled = false;...

Progress bar embedded in listview

Hello, Does anyone know how I can add a progress bar to a listview cell using "pure" api. The only examples I've found are either in c# or outdated mfc ...

Create a "floating" control in C# (WinForm app) without WPF

Hi, I want to create a "floating" control - like Visual Studio's ones (The solution explorer, for example). How can I implement such thing? Thank you. ...

Looking For A WinForms Time/Scheduler Control

A bit of a long shot but I'm looking for a .Net WinForms scheduler style control that lists times down the left and resources along the top. I've found lots of schedule controls that list days along the top and times down the left but I really need something slightly different. I'm happy to buy the control if a free version does not exis...

Asp.net Web from Dynamic Controls Based on Dynamic controls

I'm using a wizard control, step 1 has a list box with a list box containing entries 1-10. Step 2 then dynamically build and displays 1 list box per entry. Each list box in step 2 contains 5 entries each. I have one more step that needs to read the list boxes from step 2 and get their values to display 3 radio buttons per choosen entry f...

Where can I find the CSS behind standard asp.net controls?

So for example, I have a lovely button control: <asp:Button ID="Button1" runat="server" Text="Button" /> Which when renders, is a lovely dull grey, nice and rectangular, etc, etc. I know I can apply a new CSSClass to amend the CSS of said control, but where can I find the original CSS properties for this? I appreciate this is a stup...

How to show text over ToolStripProgressBar correctly?

I use ToolStripProgressBar.Paint event handler to do custom drawing on tspb control. As the code below: private void tsPB_Paint(object sender, PaintEventArgs e) { var pb = sender as ToolStripProgressBar; var g = e.Graphics; var r = e.ClipRectangle; ; var f = SystemFonts.DefaultFont; var text = string.Format("...