custom-component

How do I create a custom control with a sub-panel that accepts other controls at designtime? [duplicate]

自作多情 提交于 2019-11-30 09:50:54
This question already has an answer here: Let components dropped on my control in the IDE become children of my control 1 answer I have written a custom control, that has several sub panels. I want these sub panels to accept any additional controls dropped on them at design time. Unfortunately any control that gets dropped at design time ends up on my custom control, not on the panels. This shows in particular if I try to drop a label: The label's blue dots are shown, but it's caption isn't and if I deselect the label, it is no longer visible at all. simplified code (only one sub panel): type

“Cannot load package A, it contains unit X, which is also contained in package B”

懵懂的女人 提交于 2019-11-30 07:26:01
问题 (More package/component install fun for me -- thanks everyone for all your help to date). I am getting the error listed as the title, in Delphi 2007. Package A is my package of frame-based "viewer panels." Package B is a package containing a couple of components that are used to show information about datasets linked to a gven database (their SQL, state, class type, etc), one of which is a non-visual component (we'll call it the Inspector) which creates and calls a form showing that

JSF Lifecycle and Custom components

我们两清 提交于 2019-11-30 00:21:48
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 from the Value Binding - When do I read data from the valuebinding vs. reading it from submittedvalue and

save form field in component params joomla

半城伤御伤魂 提交于 2019-11-29 15:36:58
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 function bind($array, $ignore = '') { if (isset($array['params']) && is_array($array['params'])) { //

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

╄→尐↘猪︶ㄣ 提交于 2019-11-29 13:03:20
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. vcldeveloper You must derive your class from TPersistent , or a descendant, in order to make it available in the Object Inspector: TDispPitch =

Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

牧云@^-^@ 提交于 2019-11-29 09:18:51
As stated in the title, I copied my DLL in Visual Studio project, set it to "content" and "copy always". Added a reference to this DLL and set it to "copy locally". I successfully managed to instance my component to a form through code but it doesn't appear in the toolbox, really boring. How can I solve this issue? If I link directly the DLL project to this project it works, but now I'm treating the DLL as "external" so it's not part of the same solution of the DLL project. bluish I had this problem with @AndrewFinnell's solution : There are no components in 'c:....\XXXX.dll' that can be

Change the location of the accessory component in a filechooser

南楼画角 提交于 2019-11-29 08:39:57
I have a problem in changing the location of the accessory component in a filechooser. I customized a save file dialog by putting a check box in the accessory component of the file chooser. But the position of the check box is not good, it is really ugly. Can I move the accessory component to be underneath the file pane? How to do it? Or if you have other solution to do the same thing, also welcome. Thank you guys. I using following code to add the check box: JFileChooser fc = new JFileChooser(file) JPanel accessory = new JPanel(); JCheckBox isOpenBox = new JCheckBox("Open file after saving");

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

白昼怎懂夜的黑 提交于 2019-11-29 07:47:19
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 add this behavior to several different buttons and panel component, I would have to override a brunch of

JSF State saving and custom components with dynamically added children

风流意气都作罢 提交于 2019-11-29 07:33:59
问题 I am developing a JSF custom component. This component has the purpose of encapsulating another component (namely a PrimeFaces table) and adding customized behaviour to it. For example, one of the features that it supports is creating PrimeFaces columns dynamically from the underlying data or from certain attributes. Furthermore, it supports declaring additional PrimeFaces columns in XHTML, which should be added to the encapsulated PrimeFaces table as well. Consider this example: <my:table id

Is “implicitly imported” always a bad thing in Delphi packages?

天大地大妈咪最大 提交于 2019-11-29 03:07:45
Trying to rearrange my packages for a set of TFrame-descendent components , I'm finding it seemingly necessary to break out some of my utility TFrame descendents separate from the dialog forms which use them, mainly because the former are registered to the palette as true components and that seems to confuse the IDE sometimes with respect to the dialog forms which use them. The dialog forms in turn are called by non-visual components, which are part of a third package. This, so far , seems to make most of the compiler's dependency-related complaints / confusions go away. (I'm not out yet,