tableview

Display data in two different TableView in the same View in Swift

半世苍凉 提交于 2019-12-20 06:32:50
问题 I'm creating an app for iPad, and because of their size decided to do something a little different. I'm creating something like this: I am using two UITableView in a UIView. I need to display data 'product categories' in the first TableView and 'products' in the second TableView. The problem is display data in two tables with direferentes contents. Another detail: When a category is selected, the table 'product' is recharged with other data of other products. My question is: How can I display

dynamically populate ChoiceBox from editable column in TableView

青春壹個敷衍的年華 提交于 2019-12-20 06:13:14
问题 Basically the question title says it all. I have a column of strings (called type ) in a tableview and a corresponding column of numbers (called size ), each row representing an object CargoItem , which has the two properties type and size . Both columns are editable. The TableView is associated with the corresponding observable list of CargoItem , called cargoList . A ChoiceBox is initially set to the observable list. I have a listener attached to the ChoiceBox, so it can update a TextField

Custom Cell error addTarget button

大城市里の小女人 提交于 2019-12-20 06:10:03
问题 I created a layout as follows: in storyborad I have a view that contains a table view and I associate the Class TableViewController . Then I created a new View with a custom cell and assigned to it the class CustomCell . I have problems when I try to assign an action to the button. For various reasons I need to assign the action in TableViewController. This is my code: This is CustomCell: class CustomCategoryTableViewCell:UITableViewCell { @IBOutlet weak var customButton: UIButton! @IBOutlet

JavaFX fill a table view not possible [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-20 05:23:18
问题 This question already has answers here : Javafx PropertyValueFactory not populating Tableview (2 answers) Closed 3 years ago . I just started with javafx and I wanted to create a TableView with 3 columns where I can display some values. I created the TableView and the columns with the scene editor as fxml file. Then I created a class named Values with the special properties I matched to the columns where they should fit in. Finally I set the observable list with the "Value" objects in it as

tableview will not update on phone

本小妞迷上赌 提交于 2019-12-20 04:46:14
问题 If this is a repost, I apologize, but I have been scouring the net and cant seem to find anything that works. I have a list of workouts that I display in a tableview that are gathered in plists in the bundle. There is a also a separate tab that I have that allows a user to build their own workouts and save them in the documents folder plist file. Once they are saved, they are added to the table view. In the simulator, everyuhting works fine. But on the actual device, it is not updated unless

NullPointerException in JavaFX initialize in TableView

Deadly 提交于 2019-12-20 04:07:15
问题 I have this controller class for showing a database query in a TableView, but i am having error of NullPointerException with the "setCellValueFactory(new PropertyValueFactory" package aplicativo; import java.net.URL; import java.util.ResourceBundle; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.TableColumn; import javafx.scene.control

NullPointerException in JavaFX initialize in TableView

本小妞迷上赌 提交于 2019-12-20 04:07:14
问题 I have this controller class for showing a database query in a TableView, but i am having error of NullPointerException with the "setCellValueFactory(new PropertyValueFactory" package aplicativo; import java.net.URL; import java.util.ResourceBundle; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.TableColumn; import javafx.scene.control

Multi select in tableView javafx

前提是你 提交于 2019-12-20 01:58:07
问题 I want to multi select row in my TableView . The problem is that my application is a multitouch application, I have not a keyboard, so not a CTRL key. I have a code follow : tableViewArticle.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); But I want to select a lot of row only with a mouse click. For exemple, when I selected one row, the row change in blue, and if after I select an other row, I have two rows in blue. 回答1: You could use a custom event filter for the TableView

show TableView data into another Window contains TextField in JavaFx

强颜欢笑 提交于 2019-12-19 12:08:57
问题 I have made Two Fxml file one contains TextField and another contains TableView. And it has its Controller class. I want to show data from TableView to TextField when mouse clicked action event is performed. But we didn't get the result it shows a lots of error like : Jun 02, 2018 8:33:36 AM javafx.fxml.FXMLLoader$ValueElement processValue WARNING: Loading FXML document with JavaFX API of version 9.0.1 by JavaFX runtime of version 8.0.162 Jun 02, 2018 8:33:44 AM com.sun.javafx.css

Button state activates on wrong cells

风格不统一 提交于 2019-12-19 11:29:28
问题 I added button into cell-s and added action so if user touches it then the state is "Dislike" and if user touches again the state is "Like". However, the state applies to other cell buttons also. And if I scroll fast it just randomly picks what cell button should have the state. What causes this? I call button with function inside cellForRowAt indexPath: IndexPath function like this: cell.likeButton.addTarget(self, action: #selector(like), for: .touchUpInside) And this is the function that is