tableview

The program duplicate the list on the tableview if I go back from secondviewcontroller

为君一笑 提交于 2019-12-24 07:59:12
问题 I have a viewcontroller with a tableview and with a list of places. If I touch a place from the list, I go to the SecondViewController scene to see more information about the place. But when I go back with the back button, the program duplicate my original list, so the places are two times on the list, then three times, four times... Every time if I go to the SecondViewController and then go back. Here is my ViewController: import UIKit var nev: [String] = [] var cim: [String] = [] var ar:

xcode, reloading table view on exiting seque

匆匆过客 提交于 2019-12-24 07:55:18
问题 I'm trying to reload the values of a table view after exiting from a seque. The process being: I perform the seque manually from the profile selection view, add a new profile name, return to the profile selection view. Then I would like to reload the table view adding the new profile name. It is running the code fine (same code as original entry into the scene), but I can't seem to get the native methods of numberOfRowsInSection and numberOfRowsInSection to repopulate the table view. I

How do I clone a JavaFX TableView?

点点圈 提交于 2019-12-24 07:37:36
问题 I have a JavaFX application whose main job is to display different tables containing data loaded from CSV files. I can read CSV files into TableViews with no problems, and export them to CSVs as well. My problem is displaying the different TableViews. When I load from a CSV into a TableView, I want to save that TableView for future processing. I also want to display a table showing the newly loaded data. My strategy is to have a global TableView, call it table, that is added to the main VBox,

Change tableView Cells by choosing different cells from collectionView which is the Header of tableview

浪子不回头ぞ 提交于 2019-12-24 07:36:24
问题 I have the collectionView as my tableview header. Now I need to change the cells of the tableView depending on the cell I choose from the collection view. How do I do this from didselect of the collectionview? This is my tableview: extension DeliveryTimeVC: UITableViewDelegate, UITableViewDataSource { func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return sortedTimeFrom.count } func

JavaFX bad design: Row identity in observable lists behind the TableView?

↘锁芯ラ 提交于 2019-12-24 07:16:42
问题 Suppose I am displaying very long table with TableView. Manual says, TableView is designed to visualize an unlimited number of rows of data So, since million of rows won't fit the RAM, I would introduce some caching. This means, that ObservableList#get() is allowed to return different instances for the same row index. Is this true? What about opposite? May I return the same instance for all row indices filled with different data? I noticed, that this implies some problem with row editing. At

Why is `TableCell`'s `tableRow` property not generic?

本秂侑毒 提交于 2019-12-24 06:47:44
问题 Looking at TableCell we can see it has properties for its table view, column and row, but while the TableView and TableColumn properties are generic, the one for TableRow is a raw type, which forces you to cast unnecessarily if you want to use it. Is there a technical reason for this? Is this an oversight by the designers of JavaFX? A bug perhaps? 来源: https://stackoverflow.com/questions/42553948/why-is-tablecells-tablerow-property-not-generic

Get javafx TableColumn from corresponding column-header Node

别说谁变了你拦得住时间么 提交于 2019-12-24 03:30:51
问题 I'm replacing the javafx context menus of a table's columns. The context menu will give the user access to excel like filtering of the table view. Everything is working, but i now wan't to open the context menu on any mouse click event on the column header. Not just the standard right click. The problem hereby is, that you can only get the header node by a lookupAll() inside the parent tableview. Due to the fact, that a lookup is only possible after the table view has been rendered, i call

JavaFX TableView change selected cell colour

这一生的挚爱 提交于 2019-12-24 03:23:13
问题 I have a JavaFX TableView and a ListView and they both use custom cell factories. In particular I have overridden updateItem method in order to bind a particular CSS class based on cell value. This is part of my CSS file: .tissueCell { -fx-text-fill: #F5AD11; } .tissueCell:selected { -fx-background-color: #F5AD11; -fx-text-fill: white; } .significantDataCell { -fx-background-color: yellow; -fx-text-fill: black; } .significantDataCell:selected { -fx-background-color: white; -fx-text-fill:

TableView in QT5 doesn't show MYSQL Data, just empty rows are shown

三世轮回 提交于 2019-12-24 03:09:33
问题 I am showing you my problem by showing a screen shot. This seems easier to me. My Table is empty in my program, but it has the right amount of columns and if I add more columns in my sql workbench it will get more rows, but nothing is displayed in them. Here is my Source Code: void adminUserData::on_pushButton_Load_clicked() { // This Object is for connecting to my Database (it works). Datenbank db; db.connData(); QSqlQueryModel* model = new QSqlQueryModel(); QSqlQuery* qry = new QSqlQuery(db

iPhone Problem with custom cell

这一生的挚爱 提交于 2019-12-24 00:06:01
问题 I try this code but it's a mistake because i have a repetition of title and description... Someone can help me please? - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; CustomCell *cell=(CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell==nil){ cell=[[[CustomCell alloc]initWithFrame:CGRectZero reuseIdentifier:CellIdentifier]autorelease]; cell.accessoryType =