custom-controls

Display simple HTML in a native BlackBerry application

时光毁灭记忆、已成空白 提交于 2019-11-27 15:25:17
I want to be able to display some simple chunks of HTML in my native BlackBerry app, NOT returned from a URL. This is similar to existing Stackoverflow questions (e.g. here and here ), but I need help getting the actual BlackBerry sample code to run (or perhaps somebody to tell me why this is doomed to not work!). The BlackBerry website has some sample 'browser' code based on different API versions available: V4.5 API sample V5.0 API sample I've found the sample code that ships with the Component Packs (more info here ), and tried to get the V4.5 sample code to work. I was hoping this would be

How can I tell if a Delphi control is currently visible?

早过忘川 提交于 2019-11-27 15:18:17
问题 I need a way to for a custom control (descended from TCustomControl) to tell if it is currently visible. I'm not talking about the .Visible property; I mean whether or not it's actually being displayed on-screen at the moment. Does anyone know how to do this? 回答1: A few years back I had the same kind of problem for a Form: I was looking for a way to determine if a Form is actually visible (even only partially) to the user. In particular when it was supposed to be visible and Showing was True

Setting multiple custom elements to MultiAutoCompleteTextView : Android

梦想的初衷 提交于 2019-11-27 15:05:57
问题 Continuing from my previous post, I was able to set multiple elements to the MultiAutoCompleteTextView but I was not able to wrap those items with custom background and close button as in that link picture. I was able to do the same with single element but for multiple, ran out of luck. This is what I tried. // set text to MultiAutoCompleteTextView private void setTextSample(String contactName) { final SpannableStringBuilder sb = new SpannableStringBuilder(); TextView tv = (TextView)

Custom ASP.NET Container Control

血红的双手。 提交于 2019-11-27 14:06:41
问题 I've been trying to create a custom control that works exactly like the Panel control except surrounded by a few divs and such to create a rounded box look. I haven't been able to find a decent example of how to do this. I need to be able to place text and controls inside the control and access it directly without referencing the panel (exactly the way the Panel control works). Does anyone have any examples of this? 回答1: There is two ways to do this. One is to implement INamingContainer on

WPF Best Practices: Do custom controls work well with the MVVM design?

浪尽此生 提交于 2019-11-27 12:26:18
问题 I was looking at creating a common control that I will be able to reuse on my pages: an AddressControl which has Address1, Address2, City, State, Zip, etc... Originally I just created a class ( AddressEntity ) that contained all these items and implemented INotifyPropertyChanged . I included that class as a DependencyProperty in my Code-Behind for the AddressControl and used it as the DataContext for the bindings to its properties. Then, someone said my code was ugly and I should look into

Custom UITableViewCell programmatically using Swift

て烟熏妆下的殇ゞ 提交于 2019-11-27 10:48:44
Hey all I am trying to create a custom UITableViewCell , but I see nothing on the simulator. Can you help me please. I can see the label only if I var labUserName = UILabel(frame: CGRectMake(0.0, 0.0, 130, 30)); but it overlaps the cell. I don't understand, Auto Layout should know the preferred size/minimum size of each cell? Thanks import Foundation import UIKit class TableCellMessages: UITableViewCell { var imgUser = UIImageView(); var labUserName = UILabel(); var labMessage = UILabel(); var labTime = UILabel(); override init(style: UITableViewCellStyle, reuseIdentifier: String) { super.init

What is the difference between a User Control Library and a Custom Control Library?

荒凉一梦 提交于 2019-11-27 10:42:12
I am just coming up to speed on WPF and would like to create a reusable WPF control. When I look at the options for creating projects in Visual Studio, I see "WPF User Control Library" and "WPF Custom Control Library". It's unclear to me what the difference is between them and my Google searches have not turned up any decent explanations. I'd like to understand the differences between them and ideally see some examples of when to use one over the other. In practice custom controls are something you implement on the code level while you can use XAML for user controls. The custom controls extend

Custom vs User control

拈花ヽ惹草 提交于 2019-11-27 10:29:40
I've been reading some explanations about the difference between User and Custom Controls, for example this: http://www.wpftutorial.net/CustomVsUserControl.html I want to create, for example, a simple composition of a datagrid with 2 comboboxes which are responsible to change the values from the datagrid's items. I want to create a specific control for this because I'm going to use it a lot of times. I would like to implement the logic behind and then in the xaml invocation I only have to specify the itemsSource. For this example should I create a User or Custom control? Since I will have

Radial menu android with button click? [closed]

£可爱£侵袭症+ 提交于 2019-11-27 09:47:04
问题 I want to design menu like this. I have tried animation but it does not retains position of buttons. if any one have done this type of menu please guide me. Any help will be appreciated. 回答1: I recently created this circular menu to add up in my recent project. It looks like What you need is to create a new View and draw this view, check for the user inputs (where he is touching), design a feedback mechanism, for example, in my view, if user touches any of the 5 arcs, background color changes

Custom Composite Control not rendering correctly for only 0.5-1 sec after being added back into a VGROUP

我怕爱的太早我们不能终老 提交于 2019-11-27 08:48:53
问题 I am moving away from MXML and have built a custom component control within ActionScript . I have the control displaying correctly. The problem comes after I remove it from the display list and add it back in again with the .addElement(control) method. Here is the code that adds it back in again. private function displayParameters(parameters:ArrayCollection):void{ for(var index:int = 0; index<parameters.length; index++){ if(parameters[index] is ReportControl){ var control:ReportControl =