custom-component

Custom Control Creation in Delphi

北城以北 提交于 2019-11-29 00:41:40
i used to this on a form and create it like 10 times, that was ok, until i tried to pass this number, it started eating system resources, is there anyway i could create a component like this? it for a Simulator project, 8bits needed to indicate the value of the register in binary any help, comments, ideas are really appreciated. ty. I agree that there shouldn't be a problem with a hundred checkboxes on a form. But for fun's sake, I just wrote a component that does all drawing manually, so there is only one window handle per control (that is, per eight checkboxes). My control works both with

JSF Lifecycle and Custom components

纵饮孤独 提交于 2019-11-28 22:10:22
问题 There are a couple of things that I am having a difficult time understanding with regards to developing custom components in JSF. For the purposes of these questions, you can assume that all of the custom controls are using valuebindings/expressions (not literal bindings), but I'm interested in explanations on them as well. Where do I set the value for the valuebinding? Is this supposed to happen in decode? Or should decode do something else and then have the value set in encodeBegin? Read

Use declare styleable to set custom component input type

我们两清 提交于 2019-11-28 21:05:59
I have a CompositeComponent (EditText+ImageButton) When clicking on button the edittext content will be cleared. It is working fine. My problem is setting attributes to my component. I am using declare-styleable to set attributes to my component. I am successful at setting minLines, maxLines and textColor. How can I set inputtype to my component via xml. my attributes.xml <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="CET"> <attr name="MaxLines" format="integer"/> <attr name="MinLines" format="integer"/> <attr name="TextColor" format="color"/> <attr name="InputType

Adding Custom Attributes to Primefaces Autocomplete Component in JSF

拟墨画扇 提交于 2019-11-28 19:56:23
I asked about pass through attributes in a different question and found I could create a custom renderer for the <p:autocomplete> component but the problem is my custom renderer would be used for every p:autocomplete in my project (site-wide). Therefore I have elected to create a custom component which extends org.primefaces.component.autocomplete.AutoComplete and adds the necessary attributes to the text box. My initial thought was to add a constructor but it doesn't seem to work because the attribute map is null at this point: @FacesComponent("com.mycomponents.SiteSearch") public class

my Custom View gets drawn only when added in onCreate

与世无争的帅哥 提交于 2019-11-28 14:42:01
I made a "GraphBar" custom view that is a RelativeLayout with a TextView on the bottom and an ImageView , varying in height, above that. Here is the code: public class GraphBar extends RelativeLayout { private int mAvailHeight; // space for the bar (component minus label) private float mBarHeight; // 0.0-1.0 value public GraphBar(Context context) { this(context, null); } public GraphBar(Context context, AttributeSet attrs) { this(context, attrs, 0); } public GraphBar(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); LayoutInflater.from(context).inflate(R

How to install a component from .pas file in delphi?

[亡魂溺海] 提交于 2019-11-28 10:29:53
i've downloaded the RealTimeMarquee component for embarcadereo delphi 2010 which comes as a two files RealTimeMarquee.pas SimpleHTML.pas But when i tried to open the file using delphi to compile it, i can't see the green button ( compile / build ) activated. My question: How to install this component. thankyou PresleyDias My question: How to install this component. To install follow the steps below (same steps as Remy Lebeau-answer ) Step #1 . make a new package - Step #2 . Select New package Step #3 . Add the source files RealTimeMarquee.pas,SimpleHTML.pas Step #4 . Step #5 . A) Compile and

save form field in component params joomla

☆樱花仙子☆ 提交于 2019-11-28 09:41:16
问题 I am using joomla 2.5, I am working on custom component of joomla . I have created the form in backend admin page. what i need is , i want to save the post data of form in params row of that component in database of #_extensions . Here is my tables/component.php <?php defined('_JEXEC') or die('Restricted access'); jimport('joomla.database.table'); class componentTablecomponent extends JTable { function __construct(&$db) { parent::__construct('#__extensions', 'extension_id', $db); } public

I need help on how to implement class that can be shown in object Inspector

可紊 提交于 2019-11-28 06:44:49
问题 i have ... TDispPitch = class private iLineSize: Integer; iLineColor: TColor; bDisplayAccent: Boolean; bVisible: Boolean; published property LineSize : Integer read iLineSize write iLineSize; ...etc end; ... and i wanted this feature shown in Object Insepector to edit the settings. i try adding property DispPitch: TDispPitch read FDispPitch write FDispPitch. like the DispPitch can be shown but i cannot see its properties. like LineSize, LineColor etc. 回答1: You must derive your class from

What is the best way to add long press event to button class?

若如初见. 提交于 2019-11-28 01:24:38
问题 By Long Press, I mean pressing a button / panel and hold for a period (say 2 seconds) without releasing or dragging around. It is common in mobile phone and touch device. I had tried using Gesture, checked toPressAndHold in TabletOptions and Checked all in InteractiveGestureOptions but long pressing cause no OnGesture Call. Another implementation I can think of is adding a timer, start it in MouseDown and end it in either Timer Fired, StartDrag, MouseUp or MouseLeave. However, as I want to

Custom Control Creation in Delphi

我是研究僧i 提交于 2019-11-27 21:29:44
问题 i used to this on a form and create it like 10 times, that was ok, until i tried to pass this number, it started eating system resources, is there anyway i could create a component like this? it for a Simulator project, 8bits needed to indicate the value of the register in binary any help, comments, ideas are really appreciated. ty. 回答1: I agree that there shouldn't be a problem with a hundred checkboxes on a form. But for fun's sake, I just wrote a component that does all drawing manually,