custom-controls

Custom PopOver with pattern border

混江龙づ霸主 提交于 2019-12-06 01:45:44
I'm trying to implement popover like that: I've spent quite a lot of time trying to customize UIPopoverController and UIPopoverBackgroundView . As I understand my task is impossible with public API for popovers. It is possible: To use small image with fixed corners and stretchable center, in that case I'll have stretched stripes on the side. And also I'll have image "under" the arrow. Fill border with stripes, but in that case I don't have rounded corners. I also have annoying inner shadow inside: backgroundImageView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@

asp.net add custom control in website

Deadly 提交于 2019-12-06 01:37:54
I want to make a custom control in my website (note: not web application) Following is the code using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel; using System.Web.UI; using System.Web.UI.WebControls; namespace AnkitControls { /// <summary> /// Summary description for CustomTreeView /// </summary> public class CustomTreeViewControl : WebControl { } } Default.aspx : <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly=

Where is the resources.GetObject(“”) executing at?

早过忘川 提交于 2019-12-06 01:31:18
I have a custom control on a form. Basically my Visual Studio has been fubared for the past 5 hours because my properties are loading at initialization. The code: this.customControl.customProp = ((System.Collections.Generic.List<customType>)(resources.GetObject("customControl.customProp"))); What I would like to know is where this code is actually being executed at or is it storing these pieces of data somewhere? What is killing me right now is that there is actually data associated with this resource object, however, the data doesn't get loaded until I query the database. I can't seem to find

How to “disconnect” an accelerator , key-press-event or mouse-press-event in a GTK+ Widget?

浪尽此生 提交于 2019-12-06 00:10:41
Say I have a custom GTK+ widget obtained from a third party library. It has an accelerator, e.g it hides itself when I press 'h' or click it, and shows itself when I press 'h' again or double-click it. I want disable this particular functionality of the GTK+ widget. How can I do this without changing the source code of the Library and rebuilding it? Note: You can also give your solution in c++ , in fact it would be better that way because I am using C++ for my project. I'm guessing now, but how about gtk_widget_can_activate_accel () ? http://developer.gnome.org/gtk/2.24/GtkWidget.html#gtk

Custom View in UIAlertController

爷,独闯天下 提交于 2019-12-05 22:48:00
I am trying to put a custom view inside a UIAlertController . I'm running into some odd issues with the sizing of the custom view. I want the custom view to span the width of the UIAlertController , whatever that might be. I'm using CGRectGetWidth(alertController.view.bounds) to get the width of the alert controller. However, this seems instead to be returning the width of the entire view. using view.frame does not make a difference. UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"My Title" message:nil preferredStyle:UIAlertControllerStyleAlert]; UIView *view

Can .Net custom controls be used in VB6 form?

a 夏天 提交于 2019-12-05 20:59:50
问题 I am doing some maintenance on a VB6 Windows application. I have a .Net custom control component that I would like to use on a VB6 form. Is this possible? I know how to access non-visual .Net components from VB6 by generating a COM type library for the .Net DLL, but can a .Net custom control be used like a .OCX from VB6? If so, how is the control instantiated in VB6, added to the form, etc. Thanks in advance for any replies. 回答1: The Interop Forms toolkit will give you what you need: http:/

How Do I Change the render behavior of my custom control from being a span

你离开我真会死。 提交于 2019-12-05 20:44:29
问题 When writing a custom control it always rendered as an HTML span element. How can I change it for example to a div? 回答1: Derive your control from WebControl as follows: public class MyCustomControl : WebControl { public MyCustomControl() : base(HtmlTextWriterTag.Div) {} } That is, use the base class constructor that accepts the tag to use. 回答2: If you derive from CompositeControl there is no constructor that takes a tag type. You can override TagKey (I haven't tried it), but a more flexible

Difference between User Control and Custom Control?

℡╲_俬逩灬. 提交于 2019-12-05 20:38:02
What are the differences between User Control and Custom Control in ASP.NET AFAIK, user controls are controls that you can create out of existing controls and can be part of the project and have a designer surface for you to drag/drop. Custom controls are generally external to the project & would require to be hand-coded (using various asp.net control events & html building in the code). User Controls are inherit from UserControl class by system default and can combine controls in terms of specific UI case and can have UI logic as well and reuse again and again anywhere within project. Custom

Programmatically create special Polymer-Element

那年仲夏 提交于 2019-12-05 19:42:46
I have got a polymer-element with following html: <polymer-element name="tab-bar"> <template> <button>Hello</button> <template repeat="{{item in items}}"> <div>This element is {{ item }}</div> </template> </template> <script type="application/dart" src="tab_bar.dart"></script> </polymer-element> The underlying dart class looks as follows: import 'package:polymer/polymer.dart'; @CustomTag('tab-bar') class TabBar extends PolymerElement { List items; TabBar(List<String> items) { this.items = toObservable(items); } } With the following approach, it isn't possible to programmatically add the

Required Property in Custom ASP .NET Control

血红的双手。 提交于 2019-12-05 16:33:32
I am making a custom web control for my ASP page that inherits from CompositeDataBoundControl. I have a public property in the definition of my control that is required , if the user does not provide this property in the control definition on an ASP page it will break and we will get an exception. I want the compiler to throw a warning similar to the one when a user forgets to provide the 'runat' property of a Control. "Validation (ASP.Net): Element 'asp:Button' is missing required attribute 'runat'." Here is basically what my code looks like: public class MyControl : CompositeDataBoundControl