custom-component

How can I prevent duplication of sub components in Firemonkey compound component?

房东的猫 提交于 2019-12-13 17:17:04
问题 I am trying to write a compound component which is derived from TDummy. The component source is: TMyObjectType=(otCube,otSphere); TMyGameObject=class(TDummy) private FObj:TCustomMesh; FMyObjectType: TMyObjectType; procedure SetMyObjectType(const Value: TMyObjectType); public constructor Create(AOwner:TComponent);override; destructor Destroy;override; property MyObjectType:TMyObjectType read FMyObjectType write SetMyObjectType; end; { TMyGameObject } constructor TMyGameObject.Create(AOwner:

Send data from popup to main application.

和自甴很熟 提交于 2019-12-13 05:49:07
问题 I'm not getting the answer I'm looking for. I want to send the request data i get to the main application. <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" remove="titlewindow1_removeHandler(event)" width="400" height="220" layout="absolute" title="USER LOGIN"> <mx:Metadata> [Event(name="commEvent", type="flash.events.Event")] </mx:Metadata> <mx:Script> <![CDATA[ import data.Data; import mx.events.FlexEvent; import mx.managers.PopUpManager;

Add ajax behaviour to JSF renderer

一曲冷凌霜 提交于 2019-12-13 05:26:39
问题 I have a custom JSF component renderer that renders pagination component for datatables, but it hasn't ajax behavior . I learned that it could be done by inserting ajax to encode method or by making support of f ajax tag. Unfortunately I'm not very familiar with ajax, so could you please tell me how I should modify this code to make it ajaxable? @FacesRenderer(componentFamily="javax.faces.Command", rendererType="com.component.Pager") public class PagerRenderer extends Renderer { private

TForm property that's an array (or collection) of TFrame descendants

有些话、适合烂在心里 提交于 2019-12-13 03:16:09
问题 I am exploring this subject again, from a slightly different angle than before: I have TForm descendant which is used in a couple of other components as a dialog, that I'd like to add as a property an array of counted TFrame descendants. What multi-item property approach should I use for this? (Array, TList, TObjectList, TCollection, TOwnedCollection, etc). (I'd also love to know, conceptually, "why") 回答1: The easiest is to base this on a TCollection. Write a TCollectionItem descendant

Why won't my Facelets loop variable go out of scope?

橙三吉。 提交于 2019-12-13 02:04:21
问题 I know this looks like a lot of text, but I think it's a pretty simple concept I'm missing. I'm writing a web application with Facelets. I've got a custom tag rq:request-list that takes a list of requests as a parameter and outputs a lovely table to display them. So far, so good. rq:request-list starts out like you'd expect: <!-- ... --> <ice:dataTable value="#{list}" var="req"> <ice:column> <f:facet name="header">Date last edited</f:facet> <ice:outputText value="#{req.dateModified}" /> </ice

make custom JTextField (JCurrencyField)

我的梦境 提交于 2019-12-13 00:52:52
问题 I making a JCurrencyField to use it in my program, I almost finished creating it but I've faced an issue. JCurrencyField is a normal JTextField but it cannot accept any character that is not a number or decimal point . and I made some specifications for this JCurrencyField: The user cannot insert more than one decimal point . . The user cannot insert more than two digits after the decimal point. The issue I've faced was not being able to insert any digits before the decimal point if there are

Proper using of Facelet templates & Composite Components

久未见 提交于 2019-12-12 08:47:05
问题 I'm still not sure about proper using of JSF Templates & Composite Components. I need create an enterprise web applications, which will have a lot of pages. Every page will have the same header, menu, footer and of course different content (= JSF template). The content on every pages will consist of reusable "boxes" (= JSF composite components). The boxes consist of some fileds, buttons etc. Is my solution proper? Or should I use other technology like , Custom Components, decorate ...? layout

Cannot get custom component attribute from backing bean

核能气质少年 提交于 2019-12-12 06:14:48
问题 I have the following custom PrimeFaces Panel In the page <x:myPanel panelName="TEST123" /> And the class @FacesComponent(namespace="test",tagName="myPanel", createTag=true) public class MyPanel extends Panel { public MyPanel() { panelName = (String)getAttributes().get("panelName"); } } Why when getting the attribute from the class itself does not work getAttributes().get("panelName"); >> it returns null I even tried to use the following as well, it also returns null at the class: <f:attribute

Flex 4 disptaching custom event from custom component

五迷三道 提交于 2019-12-12 02:53:24
问题 This is similar to the question asked here. I am dispatching custom event "ShopEvent" but i am getting error "Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent" Note: Error is thrown from the parent custom component (3rd code snippet), I have added more details there This is my custom event. See the first constant, I copy pasted the event name in custom components. package com.events { import flash.events.Event; public class ShopEvent extends Event {

Creating Clickable areas on screen with PyGtk

拈花ヽ惹草 提交于 2019-12-12 02:45:47
问题 Hey guys I've run into a problem that I don't know how to solve. I just met with a team to design a GUI in python using PyGtk. I need to make a GUI that has clickable areas on screen. I need to divide the screen up into 12 equal areas with one square one in the centrer. Like this: http://imgur.com/PMT3m I thought about using buttons but buttons are rectangular. Is it possible to make buttons that are a different shape like those show in the picture? If i can would those buttons resize if I