components

JSwing components don't appear until frame is resized [duplicate]

佐手、 提交于 2019-12-11 23:18:44
问题 This question already has an answer here : Java Layout not showing components (sometimes) (1 answer) Closed 3 years ago . bit of an issue. I'm trying to make a JSwing frame with a label, textfield, and two buttons. When the routine first runs, the buttons and the textframe are invisible. When I resize the frame, the buttons and textframe appear, and remain there when I return the frame to its original size. Any ideas why this is happening? 回答1: You should call setVisible(true) on your frame

ViewDestroyedError: Attempt to use a destroyed view

折月煮酒 提交于 2019-12-11 23:09:57
问题 (angular 8 in use) I have an issue currently with my code using a behaviour subject. Component A creates another component B trough the component factory. Now, Component A subscribes to component B it's status to know when to delete it. In this case, whenever there is an error in component B, Component A will change its own status and call Component B.destroy(). However, whenever I will run this destory method, I get an error in the logs saying ERROR Error: ViewDestroyedError: Attempt to use

CSS: Positioning components using margins

可紊 提交于 2019-12-11 23:07:29
问题 In the image below, you can see i have two tabs help and Instructions , i want to place these two tabs next to each other where the Help tab currently is. When i use the margin-left: property, only the help button moves to the left and the instructions button stays in the same place. The css i am using to configure this: .v-csslayout-topbarapplicant .v-button, .v-csslayout-topbarapplicant .v-nativebutton, .v-csslayout-topbarapplicant-invert .v-button, .v-csslayout-topbarapplicant-invert .v

Android - Defining Custom Component Layouts in XML

天涯浪子 提交于 2019-12-11 22:54:10
问题 i'm reading the android developer docs on creating custom components and one thing that's unclear, is whether you can define the layout of your component using xml and then reuse that across class libraries. like, say for instance, i want to create a class library called myComponents, and in there i want to have myTehAwesumsWidget or whatever, and i want the layout to be defined in xml, can i include that xml in the referenced class library? 回答1: If you replace "class library" with "Android

“Control has no parent” in Create ComboBox

一个人想着一个人 提交于 2019-12-11 22:04:25
问题 In this code : unit MSEC; interface uses Winapi.Windows, Vcl.Dialogs, Vcl.ExtCtrls, System.SysUtils, System.Classes, Vcl.Controls, Vcl.StdCtrls; type TMSEC = class(TWinControl) private FOpr :TComboBox; public constructor Create(AOwner: TComponent); override; end; implementation const DEF_OPERATIONS :array[0..3] of Char = ('+', '-', '*', '/'); constructor TMSEC.Create(AOwner: TComponent); var i :Integer; begin inherited; FOpr:= TComboBox.Create(Self); with FOpr do begin Parent:= Self; Align:=

findDOMNode of mounted component in ReactJS

白昼怎懂夜的黑 提交于 2019-12-11 19:26:12
问题 I have two JS files included in page as utility.js and utility1.js Code for utility.js var HelloWorld = React.createClass({ render: function() { return ( <p> Hello, <input type="text" ref="mytestinput" placeholder="Your name here" />!<br /> It is {this.props.date.toTimeString()} </p> ); } }); setInterval(function() { React.render( <HelloWorld date={new Date()} />, document.getElementById('container') ); }, 1000); Code for utility1.js var MyComponent = React.createClass({ handleClick: function

Multiple select list with actionListeners?

扶醉桌前 提交于 2019-12-11 19:08:55
问题 I want to achieve the following: It should be possible to create entries, and these entries (Strings) should be displayed as a list. A list entry should be selectable (with listener method on each entry) by a single click, without holding any keyboard buttons. Also clicking an already selected entry should deselect it. Also, an entry should get a dimension, which will specify the number of subentries. These should be visible by some kind of expand button before the entry. Again, subentries

How to create dynamic radiobuttons in CodenameOne

独自空忆成欢 提交于 2019-12-11 19:07:56
问题 Using CodenameOne, I created an array of RadioButtons based on the count of records on a database table. Container searchDisplayContainer = findMyContainer(f); for(int i=0; i < records.length; i++) { RadioButton rdb = new RadioButton(); rdb.setName("rdb"+i); rdb.setText("rdb"+i); rdb.setGroup("locations"); searchDisplayContainer.addComponent(rdb); } With this code, a number of RadioButtons are displayed on the simulator screen. My problem is that after displaying the radiobuttons, I cannot

How can I reuse classes in my VB6 application?

≯℡__Kan透↙ 提交于 2019-12-11 18:45:31
问题 First of all, as I am using VB6, please confine your kind suggestions to techniques applied to VB6. I have a set of controls related to each other as the above figure shows. It includes several treeviews, a split bar, a listview, a subform( a usercontrol), and etc. When I click or change the treeview nodes in the left, the right controls will change their display accordingly, and vice versa. The data behind the scene is maintained in an Access database. This set of data management and display

C++ builder - enumerate components on TPanel

两盒软妹~` 提交于 2019-12-11 18:42:39
问题 It is quite simple to enumerate Form components for (int i=0;i<ComponentCount;i++) { ShowMessage(Components[i]->Name); //..... } but the same thing does not work if I want to enumerate only the components which are located on Panel. for (int i=0;i<Panel1->ComponentCount;i++) { ShowMessage(Panel1->Components[i]->Name); //..... } because Panel1->ComponentCount; is just zero while having several components on Panel. So, how can I enumerate the child components of Panel? 回答1: The ComponentCount