components

Inno Setup: Dynamically add a component for all files in a folder and its subfolders

喜你入骨 提交于 2019-12-17 19:33:19
问题 Inno Setup: Dynamically add all files in a folder and add a component tag, so during running of the setup the user can select custom setup and select which files to copy. I'd like to create a Inno Setup file that will grab files in a folder that users can put in there, without having to modify the Inno Setup file each time a new file is added. At the same time, I need the user of the setup file to be able to select which files to copy. If I do something like this: Source: "D:\SomeDirectory\*"

Java Swing add/remove jButtons on runtime

一个人想着一个人 提交于 2019-12-17 19:02:35
问题 My application has a module which allows the user to add jButtons on the jLayeredpane during runtime. I want to add action listeners to this dynamically added contents and also i have to provide access to delete the dynamically added buttons during runtime. Is there any way to do this ? private Map<String, JButton> dynamicButtons; public void addButton(String name) { JButton b = new JButton(name); b.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt

How to install a Delphi component package from the command line?

感情迁移 提交于 2019-12-17 18:57:12
问题 I am preparing an installer (Inno Setup) to install my component package into Delphi XE without having to manually fiddle in the IDE. How do I install a Delphi component package (for example, MyComponent.bpl) into Delphi without having to manually do it via the 'Install Packages' menu item? Is it a registry key? 回答1: Yep, registry is your friend. Packages: HKEY_CURRENT_USER\Software\<Borcadero>\BDS\<version>\Known IDE Packages HKEY_CURRENT_USER\Software\<Borcadero>\BDS\<version>\Known

How to improve the use of Delphi Frames

不打扰是莪最后的温柔 提交于 2019-12-17 17:28:57
问题 I've used frames in Delphi for years, and they are one of the most powerful features of the VCL, but standard use of them seems to have some risk such as: It's easy to accidentally move or edit the frame sub-components on a frame's host form without realising that you are 'tweaking' with the frame - I know this does not affect the original frame code, but it's generally not what you would want. When working with the frame you are still exposed to its sub-components for visual editing, even

Removing the CENTER element from a JPanel using BorderLayout

做~自己de王妃 提交于 2019-12-17 16:14:48
问题 Is there any way of removing the Component added to the CENTER of a JPanel with a BorderLayout , without having to reference the Component itself? 回答1: Something like this? BorderLayout layout = (BorderLayout)panel.getLayout(); panel.remove(layout.getLayoutComponent(BorderLayout.CENTER)); 来源: https://stackoverflow.com/questions/759321/removing-the-center-element-from-a-jpanel-using-borderlayout

Pass API data from one component into another component?

人盡茶涼 提交于 2019-12-17 13:11:11
问题 I am learning Full-stack Angular4, and wanted to know how would I be able to get data from a get call from one component into another so I can relay the data into the html page with {{data.name}}? I tried importing the component into the other component, then setting an empty object into that component.data which holds the data, but I get a empty object as a response back. What am I doing wrong? UPDATE: my shared service: import {Injectable} from "@angular/core"; import {Http, Response,

Pass API data from one component into another component?

不打扰是莪最后的温柔 提交于 2019-12-17 13:10:41
问题 I am learning Full-stack Angular4, and wanted to know how would I be able to get data from a get call from one component into another so I can relay the data into the html page with {{data.name}}? I tried importing the component into the other component, then setting an empty object into that component.data which holds the data, but I get a empty object as a response back. What am I doing wrong? UPDATE: my shared service: import {Injectable} from "@angular/core"; import {Http, Response,

Pass API data from one component into another component?

爱⌒轻易说出口 提交于 2019-12-17 13:10:10
问题 I am learning Full-stack Angular4, and wanted to know how would I be able to get data from a get call from one component into another so I can relay the data into the html page with {{data.name}}? I tried importing the component into the other component, then setting an empty object into that component.data which holds the data, but I get a empty object as a response back. What am I doing wrong? UPDATE: my shared service: import {Injectable} from "@angular/core"; import {Http, Response,

Adding / Removing components on the fly

被刻印的时光 ゝ 提交于 2019-12-17 11:03:13
问题 I need to be able to add & remove Angular components on the fly. To do so, I'm using loadIntoLocation and dispose methods, like it: Adding a component (from a layout manager): this.m_loader.loadIntoLocation(MyComponent, this.m_element, 'content').then(_componentRef => { // Create the window and set its title: var component: MyComponent = (_componentRef.instance); component.ref = _componentRef; // init the component content }); Removing a component (from the component): this.ref.dispose(); It

Adding / Removing components on the fly

爱⌒轻易说出口 提交于 2019-12-17 11:01:51
问题 I need to be able to add & remove Angular components on the fly. To do so, I'm using loadIntoLocation and dispose methods, like it: Adding a component (from a layout manager): this.m_loader.loadIntoLocation(MyComponent, this.m_element, 'content').then(_componentRef => { // Create the window and set its title: var component: MyComponent = (_componentRef.instance); component.ref = _componentRef; // init the component content }); Removing a component (from the component): this.ref.dispose(); It