custom-controls

How to create a simple Custom Container control with 2 Divs inside?

Hi Guys Im looking to create a custom ASP.NET container control that will allow me to drag further controls into it within the VS designer. The final HTML that im looking for is very simple.. <div id="panel1"> <div id="panel2"> </div> <div id="panel2"> </div> </div> With additional controls being able to be dragged i...

Add a control to the page header in ASP.NET

I'm creating a custom script control in ASP.NET The purpose of the control is simply a server variant of the tag, used to load javascript files The main purpose of this control however is to combine multiple scripts into one response so on the client side they see something like tag for each location, so all scripts registered in the ...

Infragistics UltraWinGrid EmptyDataText Equivalent?

We're using Infragistics UltraWinGrid as a base class for customized controls. One of the projects that will use this control to display search results has a requirement to display a user friendly message when no matches are located. We'd like to encapsulate that functionality into the derived control - so no customization beyond setti...

Custom Designer class for a .NET Windows Form issue

Hello guys, I have implemented a custom designer class which inherits from DocumentDesigner. The standard Form class in the .NET Framework uses the FormDocumentDesigner class (also inheriting from DocumentDesigner) but since this class is internal it is not possible to inherit from it and customize its behavior I copied the logic in thi...

How to control trackball behaviour in Android Views?

Hi. I have a FrameLayout view which contains one (MapView-like) control and some additional buttons overlaying it. (the layout xml is below). I want to allow the user to pan/scroll the main view using not only touch but also the Trackball. The problem is - using the trackball just switches the focus between all the controls on the layo...

Highlight selected custom control with C# WinForms

I have created a custom control (the control is used for drag and drop) and I want to add focus and selected events to the control. Both need to be visually distinct. So I plan to implement a windows style for both of these events. For focus I have the control drawing a solid and a dotted line around the control using the following code ...

NSPopUpButtonCell inside custom cell does not pop up when clicked.

I've created a custom subclass of NSCell with an NSImageCell, some NSTextFieldCells, and an NSPopUpButtonCell. I'm initializing the pop up cell using: myPopUpCell = [[NSPopUpButtonCell alloc] init]; [myPopUpCell setBordered:NO]; [myPopUpCell setAutoenablesItems:NO]; [myPopUpCell addItemsWithTitles:[NSArray arrayWithObje...

Multiple instance UserControl's child events aren't firing.

I've written my first UserControl in ASP.Net. It is a user editable ListBox. It contains a ListBox, a HiddenField, a TextBox, and three Buttons (add, remove, and save). Add and remove perform javascript edit of the ListBox and stores the changes in the HiddenField. The save button posts back to the server, causing the HiddenField Val...

WPF Databinding based on conditions

Goal Develop a custom control which displays summary data for a specified week. The data passed in would be as follows: 3rd May 2009 Customer A $2000 4th May 2009 Customer A $3900 6th May 2009 Customer B $1900 The expected display would be 3rd May 4th May 5th May 6th May Cu...

After selecting item in NSPopUpButtonCell inside custom NSCell table view must be refocused

I have an NSPopUpButtonCell inside a custom NSCell which is being used in an NSTableView. I'm using - (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView to pop up the pop up menu when it is required. The problem is that after an item is selected from the menu the table view seems to lose focus, such that it must...

Custom control rendering in a details view row (ASP.NET)

In one of the rows of a details view control I want to be able to chose what control is to be rendered on edit mode. Basically I have to render a checkbox in one situation, while in another I have to render a text box. Other rows are How can I achieve this, I am a beginner so links and code snippets would be very helpful? ...

How do i create a bindable event for my custom control?

How do I create an event on my custom asp.net control which can bubble up to its parent? I know how to add events and handle them but where I'm getting a bit stuck is on how to add an event which can be wired up to the parent in a repeater control for example. In the repeater is the control, the onclick event for example connected to t...

Forbidding access to Inherited winform controls

Hi! I am writing a BaseForm to be inherited. The BaseForm has some basic standard controls of my application. The problem is: I want allow inherited forms to use and change this controls, but not remove they from the form. The biggest problem is a TabControl which Tabs must be added by users Inherited Forms. If I set "Modifiers" prope...

Images in a WPF Custom Control Library

I need to put an image in the default view of a custom control. However, whenever I try to test the control it can't locate the image. I have tried to compile it as an embedded resource and just a plain resource in VS. Neither of these have worked. So is there a correct way to do this? ...

How to Create custom gridview control?

Can anyone help me in creating Custom GridView Control in c# .Net? ...

ASP.NET Panel subclass not appearing correctly in the Designer

I have subclassed the ASP.NET Panel control to customise the rendering of the GroupingText. However, while it appears fine in the final output, it is not appearing correctly in the designer. A sample of what I am doing follows: Is there anything else I need to do to make it appear correctly in the designer? Imports System.Web.UI Pub...

How to avoid NullPointerException when using custom Views or SurfaceViews

Hi, I created a custom SurfaceView called CaptureView and tried to add it into main.xml file: <dev.recorder.client.CaptureView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/capturePreview"/> The application seems to work fine but if I switch from main.xml tab to Layout in Eclipse the text N...

Trying to change the Border Color of a label

I'm working in VB, VS2008, winforms. I've got some labels to create, and I'm using the BorderStyle = FixedSingle. Is there any way to change the color of this border? It is always defaulting to black. ...

[ASP.NET] What are the differences between User Controls, Server Controls & Custom Controls?

I thought I had reasonable answers for this question at a recent interview, but I bombed it. :( What are the major differences between the three? If not obvious by the answer to the previous bullet, when would you choose one over the other? ...

WPF "hex grid" component

Jumping into the world of WPF custom controls, and was wondering what the best way to design a HexGrid control would be? Think your favorite table-top war game; or, equally likely, your favorite video game that steals the design from a proud history of table-top war games. The underlying model exposes one significant method, as a part ...