custom-component

How do I group my component's properties in the Object Inspector?

柔情痞子 提交于 2019-12-19 02:43:09
问题 I want my component which will be non-visual to have its published properties under a category not on the top level of the Object Inspector. Take the below example: type TMyComponent = class(TComponent) protected function GetSomeValue: string; function GetSomeValueExt: string; published property SomeValue: string read GetSomeValue; property SomeValueExt: string read GetSomeValueExt; end; procedure Register; implementation procedure Register; begin RegisterComponents('My Component',

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

社会主义新天地 提交于 2019-12-18 13:27:44
问题 This question already has an answer here : Let components dropped on my control in the IDE become children of my control (1 answer) Closed 4 years ago . 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,

Transparent TCustomControl?

拈花ヽ惹草 提交于 2019-12-18 12:19:34
问题 I need to create transparent component inheriting from TCustomControl.. so it is custom painted, yet is container for other components. Can you tell me how to achieve this? 回答1: Inherit from TCustomTransparentControl and include csAcceptsControls control style at creation. 来源: https://stackoverflow.com/questions/6682396/transparent-tcustomcontrol

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

大城市里の小女人 提交于 2019-12-18 05:43:17
问题 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. 回答1: I had this

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

試著忘記壹切 提交于 2019-12-17 19:26:12
问题 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 回答1: 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

JSF 2 Custom components having Expression Language for attribute value don't trigger the attribute setter

落花浮王杯 提交于 2019-12-17 16:45:31
问题 I have build a custom component in JSF 2.0 The tag looks like this: <x:myTag id="1" name="AAA" /> The corresponding java class: @FacesComponent("a.b.c.MyTag") public class UIMyTag extends UIInput { private String name; private String id; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name =

Creating a custom editText with tag-like feature

跟風遠走 提交于 2019-12-17 10:28:51
问题 I've been searching around but could not find any answers to this. What I'm trying to implement is an EditText similar to the 'To' field found in the composing screen of the ICS gmail app. Here's an image describing what I want: I'm thinking of extending EditText and implementing my own custom EditText class but I'm not really sure how to do that or even if that's the best solution. Any thoughts? 回答1: Adapted the solution from this answer. Separates the input automatically when inserting a

Exception raised when setting Text property of TEdit in custom component (Lazarus)

跟風遠走 提交于 2019-12-13 21:00:24
问题 Using: Lazarus 1.2.0; Windows 32-bit application I have created a custom component derived from TCustomPanel and contains some TEdit controls. At runtime, when I try to set the Text property of an edit control in my component, I get a runtime error. This is the error: Project project1 raised exception class 'External: SIGSEGV'. In file '.\include\control.inc' at line 3246: GetTextMethod := TMethod(@Self.GetTextBuf); I Googled and could not find anybody else reporting this error specifically

JList of cards?

守給你的承諾、 提交于 2019-12-13 19:18:46
问题 This is related to: How to make a dynamic image at run time? After I have the page images I would like to present them in a list so the user can select the page to play. I know JList do support images but that would display the whole image losing the card deck feeling. Probably I would only show the edge of the image with its name and highlight it somehow. Any idea? 回答1: Pointer: You may use Layerd Pane You may have to break your mind-set with JList and then think of a different component,

Check for either ADO.NET / OLEDB Connection presence

我只是一个虾纸丫 提交于 2019-12-13 17:19:07
问题 I am developing a custom SSIS component for use across my entire company. Right now the code (which is from here) accepts only ADO.NET connection type. I would like to support OLEDB type as well and would like to change my code accordingly. The piece of code that checks for valid ADO.NET connectivity is: SqlConnection connection = connections[_connectionName].AcquireConnection(null) as SqlConnection; if (connection == null) { componentEvents.FireError(0, METHOD_NAME, "The connection is not a