tableview

Updating TableView row appearance

怎甘沉沦 提交于 2019-12-17 12:24:31
问题 I'm having some dificulties to change the appearance of some TableView rows. The line should show the text with a stroke and in red. Actually, I can show it in red color but still can't do the stroke. This is the css class I'm using to change the appearance of the line: .itemCancelado { -fx-strikethrough: true; -fx-text-fill: red; } This style class is added when the user mark the item as canceled: public class ItemCanceladoCellFactory implements Callback<TableColumn, TableCell> { @Override

iOS 11 Floating TableView Header

自作多情 提交于 2019-12-17 09:58:56
问题 Have an app going with multiple sections, a few rows per section when "expanded", none when "collapsed". Each section has a section header, was reusing them using a subclass of UITableViewHeaderFooterView etc. So far so good. Then in iOS 11: I've used the visual debugger, and confirmed it's my section header floating. All the rows beneath the header are displaying correctly, the other headers show fine. In an effort to restore sanity, I threw out all of the reuse logic for the header and just

Adapt TableView menu button

末鹿安然 提交于 2019-12-17 09:52:42
问题 Problem The setTableMenuButtonVisible of a TableView provides a mechanism to change the visibility of a table column. However that functionality leaves a lot to be desired: The menu should remain open. I have e. g. 15 table columns and it's a pain to click menu open -> click column -> click menu open -> click next column -> ... It's a pain to change the visibility of multiple columns There should be a select all / deselect all functionality There should be a way to extend the menu with custom

Autoupdating rows in TableView from model

╄→гoц情女王★ 提交于 2019-12-17 09:46:07
问题 I've been looking information about refreshing data into a tableview. I was trying modifying directly the model, but I get a bug. I modify the model, but the table doesn't refreshed, only when I move a column, the table shows the modified values. To show you an example (13-6) I take the tutorial: http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJABIEED And I modify it including a button and in its action: Button button = new Button("Modify"); button.setOnAction(new EventHandler

How to add button in JavaFX table view

时光总嘲笑我的痴心妄想 提交于 2019-12-17 07:23:58
问题 I have searched at Google and Stackoverflow for this and I just don't get the given examples. Can someone please explain it to me. I want to add a button to the last column of a table view and when it gets clicked it should trigger a listener and pass the object of the buttons row. I just do not get the following example from gist.github.com : This is my full current code: public class SchermdeelWerkplaats extends BorderPane{ //ATD moeder klasse met alle collecties etc. private ATD $;

JavaFX 2.1 TableView refresh items

只愿长相守 提交于 2019-12-17 02:30:48
问题 I have this common issue, as it appears to be. My table view wont refresh my items after I reset them. I have checked the data and it's the new one. I tried multiple solution from internet but no success. Can't reset all the columns because it adds one empty one extra (dont know why) and the resize just breakes. My table is not editable . The new data is changed. The data is refreshed if I change the ordering of the items and the rows change (:|). I'm just left without ideas. At the moment

creating an action when tableView cell in swift touched or clicked

吃可爱长大的小学妹 提交于 2019-12-14 04:23:01
问题 I a tableView class that displays a text in cells. I need to be able to touch/click text in a cell and create an action (display the next table view) based on the text in the cell clicked. Class is as follows: import UIKit class SecondViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! let textCellIdentifier = "TextCell" let catRet = XnYCategories.mainCats("sport") override func viewDidLoad() { super.viewDidLoad() tableView

UILocalizedIndexedCollation locale different than English

两盒软妹~` 提交于 2019-12-14 04:00:03
问题 I am using Tableview with UILocalizedIndexedCollation to show the index on right side but the language on my phone is Swedish (svenska) hence I see some special characters specific to Swedish language like å ä ö after A-Z . In A-Z some of the characters are missing like Q, X etc which I believe are not there in Sweidsh locale. I am facing issue when I click say character "S" , it shows me section "R" instead of "S" even though there are entries in "S" . Also for last characters "å", "ä" it

Ad cell after every five cells in tableview

随声附和 提交于 2019-12-14 03:39:54
问题 I need add an ad cell with only image after every five news cells in table view. If I will add second section for ad cells, an ad cell will be shown after all news cells. If I will add an ad cell when indexPath.row == 4 , my fifth news cell won't appear because of cell.details = news[indexPath.row] . Any suggestions how can I do that? Thanks. 回答1: In the method cellForRowAtIndexPath of UITableViewDataSource do next: if (indexPath.row % 5 == 0) { // configure ad cell } else { // configure

Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)'

回眸只為那壹抹淺笑 提交于 2019-12-14 03:33:16
问题 Wanna pass data from a ViewController which has TableView init, to another ViewController. But it's showing me the error "Ambiguous reference to member 'tableView(_:numberOfRowsInSection:)' " @IBOutlet weak var completedCaseTableView: UITableView! override func viewDidLoad() { super.viewDidLoad() completedCaseTableView.delegate = self completedCaseTableView.dataSource = self // Do any additional setup after loading the view. } public func numberOfSections(in tableView: UITableView) -> Int {