components

focused component reference

纵然是瞬间 提交于 2019-12-01 23:43:25
I am working on a simple java swing based application. How would I get and set the text of the currently focused textfield/textarea of a form? I know how to determine which component has focus but I can not figure out how I can get the selected text of the component. I use getFocusOwner() but it return a Component and therefore does not implement the method getSelectedText(). Do I somehow need to do a typecast? Depending on your exact context, you might consider to use a custom TextAction: its method getTextComponent(ActionEvent) returns the most recent focused text component. A code snippet:

Cannot read property 'post' of undefined vue

落爺英雄遲暮 提交于 2019-12-01 23:43:19
Thanks for reading my question. I have read about my problem VUE JS 2 + WEBPACK Cannot read property 'get' of undefined VUE RESOURCE But my system no read Vue var :( I have a vue component calls app.vue and i need to use vue-resource to get data from my post. But the error a lot times is: TypeError: Cannot read property 'post' of undefined at VueComponent.loadingProcess Do u have ideas to solve it? My app.vue <script> var Vue = require('vue'); //Vue.use(require('vue-resource')); //Vue.use(); export default { data () { return { msg: 'Hello from vue-loader! nice!', user: {} } }, mounted:

List of components implementing NamingContainer

假装没事ソ 提交于 2019-12-01 21:09:28
I found that there is something called NamingContainer in JSF. It is not clear that which component is a naming container. As far as I know, <h:form> , <h:dataTable> and custom components are naming containers. Where can I get a list of classes that implement javax.faces.component.NamingContainer ? it depends on libraries you include. simplest way is to use eclipse type hierarchy. this is mine, and includes jsf RI 2.2, Primefaces 4.0, Omnifaces 1.7 and a couple of self-made: 来源: https://stackoverflow.com/questions/21389580/list-of-components-implementing-namingcontainer

Designintf.dcu not found in custom component

别说谁变了你拦得住时间么 提交于 2019-12-01 21:01:15
I am here converting some customize delphi component to latest delphi xe5. I already build it in delphi xe5 ide and where desgninf i replaced with designintf and design editor. i also include designide.dcp in reference . it build and install sucessfully . but there some packages while i try to use and complie error like designinf.dcu not found come . i study on internet for solution as after delphi 6 their delphi not redistributed their design time packges. but because it in delphi 5 and complex one i can invest time on dividing design and runtime code and test it. kindly any alternative

How to catch the moment when the parent control has been resized?

空扰寡人 提交于 2019-12-01 20:59:11
I have a visual component derived from TWinControl. I need to do some work in my component when its parent control has been resized. In general case, the "Align" property of my component is alNone. How to catch the event of resizing the parent control? Is it possible? If a TWinControl (the parent) is changed in size, then TWinControl.Realign is called in the WM_SIZE handler. This bubbles via TWinControl.AlignControls into iterating over all the child controls which have the Align property set to anything else then alNone . When set to alCustom , SetBounds of the child controls will be called

Array Property, TList, TStringList, or TCollection, etc (Delphi Win32)

纵然是瞬间 提交于 2019-12-01 18:21:42
I am developing various components, and regularly run into the need to have a property that has a "one-to-many" relationship, component-to-property-member. The components are often visual components, but not always, and sometimes need to be registered with the IDE (i.e. use the Property Inspector), but not always. I find myself unsure of which route to take when setting up these properties -- using an array property, a TList, a TStringList, a TCollection, or something else altogether (perhaps a new class that inherits from one of those). What are the "best practices" / guidelines for which to

Creating a new component by combining two controls (TEdit and TTrackBar) in Delphi VCL

假如想象 提交于 2019-12-01 17:52:16
I am developing a Delphi 10.1 VCL application for Windows. For integer or float input I need a number input field which is connected with a slider. When the user changes the number in the input field the slider position changes accordingly. When the user changes the slider position the number in the number field is updated. I can solve this by using a TEdit and a TTrackBar and add the necessary update functionality in their OnChange event handlers. The problem is that I need many of such inputs on different forms. Therefore I would like to create a new component which combines the two controls

Passing html into Vue component

吃可爱长大的小学妹 提交于 2019-12-01 17:24:53
At the moment I pass some parameters into a vue component <Slider :images= "['/img/work/slide2.png', '/img/work/slide2.png', '/img/work/slide3.png']" :html="['<div>hello</div>', '<div>goodbye</div>']" </Slider> The slider is either an 'html' slider or one with images. This works fine although the html I pass in is going to get a lot more complex, maybe 30 lines and this will be harder to read and manage as params. Can I pass in an external reference and pull that into the component? <div v-for="content in html"> <div class="work-slide">{{ content }}</div> </div> As you can see the loop in the

Passing html into Vue component

浪子不回头ぞ 提交于 2019-12-01 16:28:26
问题 At the moment I pass some parameters into a vue component <Slider :images= "['/img/work/slide2.png', '/img/work/slide2.png', '/img/work/slide3.png']" :html="['<div>hello</div>', '<div>goodbye</div>']" </Slider> The slider is either an 'html' slider or one with images. This works fine although the html I pass in is going to get a lot more complex, maybe 30 lines and this will be harder to read and manage as params. Can I pass in an external reference and pull that into the component? <div v

What could cause Double Buffering to kill my app?

大憨熊 提交于 2019-12-01 16:11:16
I have a few custom (winforms) components that draw to the screen using GDI+. To prevent flickering on repaint, I decided to enable double buffering, so I added a line to my constructor: public ColourWheel() { InitializeComponent(); this.DoubleBuffered = true; } Which works fine on this component (ColourWheel). When I add the same line to the constructor of either of my other two (similarly structured) components, I get a couple of strange symptoms: When I try to run a form with the component on, I get an Argument Exception on Application.Run(new Form()); . If I switch to design mode, I get an