FAQ Database Discussion Community


Ignore all new incoming mousewheel messages while event is being handled

delphi,custom-controls,mouse,vcl,mousewheel
I am using some custom combobox control derived from TCustomControl and I am handling mouse events. Let's call it TMyComboBox. I am handling TMyComboBox.OnChange and doing some operations which takes some time to finish (approx. 200ms) (doing some external hardware changes). Because I also implemented mouse wheel I am able...

createDefaultSkin() returned null error in JavaFX custom control

javafx,custom-controls
Dear Stackoverflow community, I've implemented a custom control in JavaFX extending Control class. Everything is just working fine, but I keep getting the error message Jan 30, 2015 8:33:31 AM javafx.scene.control.Control impl_processCSS SEVERE: The -fx-skin property has not been defined in CSS for [email protected] and createDefaultSkin() returned null. when I...

Objective C: Own controls for a blog

ios,objective-c,uiscrollview,custom-controls
i want to make an app for a little blog. (Looks little bit like the facebook timeline) There is already a website for it. I know that i can make a HTML document to an app, but i want a native version.The website looks like that: The scructure is very...

Show custom control hint when disabled

delphi,custom-controls,vcl
I've written a custom control (TCustomControl) which shows the standard built-in hint on hovering. However, when the control is disabled, the hint does not show. But, the TSpeedButton does show a hint when it's disabled, so there must be a way I can do the same in my control. What...

Convert Shape into reusable Geometry in WPF

c#,wpf,geometry,custom-controls,shape
I am trying to convert a System.Windows.Shapes.Shape object into a System.Windows.Media.Geometry object. With the Geometry object, I am going to render it multiple times with a custom graph control depending on a set of data points. This requires that each instance of the Geometry object has a unique TranslateTransform object....

Why would an AfterPageLoad event fire on a custom control that is not rendered?

rendering,xpages,custom-controls
I have an XPage shown below. On initial load of the XPage the custom control ccWFSCat1template is set to Rendered = false. However, in the AfterPageLoad of the custom control I have this code sessionScope.ssCat1View = compositeData.cat1View; getCategory(compositeData.cat1View ,"" , compositeData.targetDB); when the XPage first loads the value ssShowControl is...

DataTrigger is not working

wpf,combobox,treeview,radio-button,custom-controls
I'm learning how to create custom controls in WPF, however I'm having problems about how to use the DataTrigger. My component is basically one ComboBox and I added 3 RadioButtons on the the top of it. Here's what I'm trying to do: I created an enum: public enum TipoTree {...

View Default Style of Element(TextBox)

wpf,xaml,custom-controls
I am attempting to modify the style of a CustomControl based on TextBox, I have been largely successful. The last thing I'm attempting to accomplish is to make it dim when disabled. I have successfully gotten this to work but the color is off, it doesn't match the standard TextBoxes...

Custom drawing using System.Windows.Forms.BorderStyle?

c#,.net,vb.net,winforms,custom-controls
I want to mimick drawing of default border based on value of property BorderStyle. Instead of single border around the control, my control is visualised as four adjacent custom-drawn boxes (2×2), each having standard border drawn individually. So for example, if Control.Border is set to FixedSingle value I want to...

Custom Control DataBinding wpf

wpf,wpf-controls,custom-controls,dependency-properties
Currently implementing a custom control I would like to bind some Value directly from my viewModel without using xaml. I can do this: <customControls:MyControl MyValue="{Binding ElementName=MyElem, Path=Text}"> <Textbox Text="{Binding Mytext}" /> But not: <customControls:MyControl MyValue="{Binding MyText}"> The controls is defined in a template and inside the Control code my the...

Custom WPF DataGrid with optional button column

c#,wpf,xaml,datagrid,custom-controls
I am creating a custom DataGrid control which has a property, ShowCloneColumn. If you set this property to true the DataGrid should add another column with a Button. The class I've created derives from DataGrid and implemented a Dependency Property, ShowCloneColumn. public static readonly DependencyProperty ShowCloneColumnProperty = DependencyProperty.Register("ShowCloneColumn", typeof(bool), typeof(CloneRowDataGrid),...

Unable to Show/Display Custom Alert

ios,custom-controls,uialertview,modalviewcontroller
I found this cool looking "Custom Alert" iOS Control. But the problem is that, it is not working as it supposed to be. Whenever I tried to show the Alert. It seems to place an invisible overlay on top of my current view and causes the underlying it not to...

Android is ignoring padding inside EditText

android,layout,custom-controls
could somebody tell my why Android is ignoring padding i added? Have i did something terribly stupid? I was trying to make some custom inputs for texts. But i encountered weird problem with padding inside EditTexts Code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/lightBeige" tools:context=".LoginActivity"> <LinearLayout android:layout_width="match_parent"...

Custom spinner drop-down showing data from bottom first time

android,custom-controls,android-spinner
I have create a spinner and set data using custom adapter. In that case, If I click on spinner I am getting drop-down which start from bottom. I need that drop down start from top. I am getting this issue as shown in image As shown in image Data getting...

WPF Custom Control VB.net

wpf,vb.net,xaml,custom-controls
I've created a custom control called ecTextBox in VB.NET which uses a control template in Generic.xaml. That works. In code behind of the custom control I override metadata in the constructor: Public Sub New() DefaultStyleKeyProperty.OverrideMetadata(GetType(ecTextBox), New FrameworkPropertyMetadata(GetType(ecTextBox))) End Sub In MainWindow.xaml I use the custom control with a simple <ec:ecTextBox/>...

WPF C# Custom Control Cannot Acces to my CustomImageButton class in my project

c#,wpf,xaml,custom-controls
I have a WPF C# Solution Main and in that Solution I have multiple rpojects. Solution: Main - Project: Common - Project: WindowThemes - Themes => Generic.xaml - CustomImageButton.cs - Project: StartUp - Project: UI - User Control : User.xaml In my User.xaml I'm trying to attach the Custom Control...

Converting an unknown class to its base class

c#,winforms,custom-controls
I'm creating a custom toolbox in windows forms (like the one you pick the controls in the VS Form Designer). To get the image that appears on side of the text of the control I'm using this: ToolboxItem tbi = item as ToolboxItem; var image = tbi.Bitmap; Where item can...

Overriding init() in a CustomUIView crashes app (EXC_BAD ACCESS)

ios,objective-c,swift,uiview,custom-controls
I am trying to subclass a UIView in Swift. Howver the app crashes (EXC_BAD_ACCESS) when the initializer is called Here is the class class CustomActionSheet: UIView { private var cancelButtonTitle: String!; private var destructiveButtonTitle: String!; private var otherButtonTitles: [String]!; convenience init() { self.init();//EXC_BAD_ACCESS } required init(coder aDecoder: NSCoder) { super.init(coder:...

VideoView CustomControllers Visibility

android,android-layout,custom-controls,videoview,android-videoview
I have created custom controllers with seekbar on videoview. These controllers are in a linearlayout and works fine. Now I want to set visibility of this custom controller layout like any other android player. Like when i starts the video it appears for 7 second then disappears and when user...

NSButton(Cell) setFont

cocoa,custom-controls,nsbutton,nsbuttoncell
It seems that NSButtonCell's setFont method is not available anymore from 10.9. Is there any way (or category) to (re)implement it? I don't know why Apple forces it's own styles on buttons. I am trying for 2 days to style my own custom button (I also needed a category to...

Swift UITableViewCell Alignment

uitableview,swift,alignment,custom-controls,subtitle
I am trying to display a page like the following page title (left align) region name(center align) people in the region(subtitle with email in the detail label) But if I choose subtitle as cell style, everything will be left aligned and I cannot change them in the code. Then If...

WPF usercontrol combine ellipse and arrow

wpf,custom-controls,rotatetransform
I want to create a custom usercontrol to represent a player in a 2D map. I had an ellipse to represent the player but I want to have on the border of the ellipse an arrow to indicate where the player is looking. This is what I tried : <Ellipse...

Custom Rounded Button without Corner Radius

ios,custom-controls,calayer
how do we subclass a UIbutton and customize it so that it has a round end like this one on Periscope. The Following Button. I would like to PREVENT using layer.CornerRadius though. Using a BezierPath perhaps? but I have a math problem creating the Path. Any thoughts? Thank you ...

Subclass a silverlight templated control

c#,wpf,silverlight,control,custom-controls
I want to create few custom controls. Here is a screen shot of what I'm trying to achieve. Each control contains two parts, a label (TextBlock) and an editor (UIElement). The label part is common to all controls. I don't want to keep defining label in each custom controls I...

How to register a custom control in Web.config file using powershell script

asp.net,powershell,web-config,custom-controls,nuget
When Nuget package for a custom control is installed, I want to register the control automatically inside the <controls> section of Web.config file. I'm new to Powershell script. I want to add the following line inside the <controls> section of the Web.config file if it is not added already. <add...

AngularJS dropdownlist with treeview

angularjs,drop-down-menu,treeview,custom-controls
I am new to angularjs, i want to use dropdownlist with treeview structure. i used both dropdownlist and treeview control separately but find difficulty in using together. can anyone have idea about how to use both together(dropdownlist+treeview)

Custom alert dialog android

android,custom-controls,android-custom-view,android-alertdialog,customdialog
I am working with custom alert dialog in android. I have followed the link 1 and linke 2. In my code using these styles. <style name="DialogAnimation"> <item name="android:windowEnterAnimation">@anim/slide_up_dialog</item> <item name="android:windowExitAnimation">@anim/slide_out_down</item> <!-- Animation for dialog box --> <style name="DialogSlideAnim" parent="AppBaseTheme"> <item name="android:windowAnimationStyle">@style/DialogAnimation</item> </style> From these styles I am...

How to attach an eventhandler from a customcontrol to its parent usercontrol close event?

wpf,user-controls,custom-controls
I have been unable to find an answer to this. I have a long series of usercontrols, each creating one or more usercontrol children. The last usercontrol in the series creates a custom control that uses unmanaged code. I need the custom control to be made aware of the user...

Component editor doesn't immediately prompt for saving new property values

delphi,ide,custom-controls,delphi-xe7
I have a custom control which has a component editor (two different screens available through two different context menu items). In both these instances, when I change properties of the component it's editing, the IDE does not acknowledge that any changes have been made, and thus the "Save All" button...

ScrollBar Windows Store App

c#,xaml,scrollbar,custom-controls
I'm trying to create my own control. And i'm stuck on adding scroll bars to it. For test purposes i hardcoded the scroll bar values. Here is my class: public sealed class BarrelPanel : Control { public static readonly DependencyProperty VerticalScrollBarVisibilityProperty = DependencyProperty.Register( "VerticalScrollBarVisibility", typeof(Visibility), typeof(BarrelPanel), null); public Visibility VerticalScrollBarVisibility...

Swift - Custom control for UISlider

ios,swift,xcode6,custom-controls
I already created a custom control for UISlider. This UISlider have 2 thumbs so it can find minimum and maximum values. I take these tutorials as my references. http://www.raywenderlich.com/76433/how-to-make-a-custom-control-swift http://www.sitepoint.com/wicked-ios-range-slider-part-one/ Compiled successfully but my UISlider looks weird. You can take a look my github repository here. https://github.com/datomnurdin/RevivalxSwiftSlider My custom control...

Custom Numericupdown

c#,winforms,custom-controls
I'm trying to create a custom numericUpDown control. I'm trying to add text to the numericUpDown and I got it working good. But, now I want to find a way to select only the number when clicking in the control, because at this moment when I "edit" the value manually,...

WPF Custom TextBox with Decimal Formatting

wpf,textbox,format,decimal,custom-controls
I am new to WPF. I have a requirement that I need to develop a custom textbox control which should support the functionality like: Should accept only decimal values. Should round off to 3 decimal places when assigned a value through code or by the user. Should show the full...

Fast way to obtain underlying java component for controls in matlab

performance,matlab,user-interface,custom-controls
I'd like to obtain a reference to underlying java components for the controls I have in my GUI so as to customize their appearance. I know about findjobj from Yair Altman which works really well: myLink = uicontrol('String', '<html><u>Button that looks like a link.</u></html>'); jObj = findjobj(myLink); jObj.setContentAreaFilled(0); Unfortunately this...

How to make a component editor perform original handler on double click?

delphi,custom-controls,delphi-xe7
I've built a custom component editor (TComponentEditor) for a custom control of mine. I am implementing the right-click context menu, which means by default, double-clicking the control in design-time executes the first of the context menu items. However, upon double-click, I do not wish for this to happen. I would...

Sync Blinking Labels in C#

c#,timer,label,custom-controls
I created a BlinkingLabelclass, derives from Forms.Label, which has a Forms.Timer which allows me to enable and disable the blinking effect. I have created 4 labels of BlinkingLabel type, my problem is that if all 4 labels where to blink in different times, the blinking effect is not synced. How...

Get ItemsControl children to inherit foreground in WinRT

windows-runtime,custom-controls,windows-8.1
In a custom TemplatedControl I have an ItemsControl that is populated outside of the custom TemplatedControl. I want the (future) children of the ItemsControl to automatically inherit the Foreground value from the ItemsControl. I want to be able to change the Foreground value from the TemplatedControl, and have the child...