tableview

No content in TableView

走远了吗. 提交于 2019-12-13 00:44:46
问题 I want to load some data from a database into my tableview.I've got a code and it works fine but no my tableview is empty .... Here is my fxml file: <TableView fx:id="libraryNode" editable="true" onKeyPressed="#onLibraryRequest" xmlns:fx="http://javafx.com/fxml" fx:controller="mediabox.app.controller.MusicscreenController"> <columns> <TableColumn text="Index" prefWidth="40" > <cellValueFactory> <PropertyValueFactory property="id" /> </cellValueFactory> </TableColumn> <TableColumn text="Titel"

ScrollView did not move up when click textfield inside tableView

不想你离开。 提交于 2019-12-13 00:29:35
问题 I tried this code : in viewWillAppear : NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillDisappear), name: Notification.Name.UIKeyboardWillHide, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillAppear), name: NSNotification.Name.UIKeyboardWillShow, object: nil) and : @objc func keyboardWillAppear(notification:NSNotification) { print("keyboard appear") var info = notification.userInfo let keyBoardSize = info!

JavaFX TableView: Select the whole TableColumn and get the index

為{幸葍}努か 提交于 2019-12-12 22:56:06
问题 Assume that we have a simple Tableview with 3 columns (A, B, C). Each Column contains some data which is not important at the moment. I wondered if it would be possible to make only a whole column selectable (no matter where the user clicks in the column) and retrieve the ID and/or index of that column selected by the user? For example, the user clicks somewhere in the area of column B. In that case the whole column should be marked and index 2 should be returned. Any help would be

Swift: How to remove duplicates from my table view?

空扰寡人 提交于 2019-12-12 19:05:03
问题 Problem here is that I'm getting duplicates in my table view and I know why but I don't know how to fix it and implement a different system. My app is a blog reader that reads from a MYSQL database using PHP to send JSON to my Swift app. My table view has two sections, one for all the objects from the database and second section is for when I click the follow button on the cells, basically move the objects from mainArray to followedArray. Each section is using an array so for example I move

Javafx tableview items prevent duplicates

六眼飞鱼酱① 提交于 2019-12-12 18:30:09
问题 I'm using javafx tableview with observableList list, I tried to prevent list from holding duplicate items. After doing some search, i figure out that an observableSet can do this job by overidding thoes methodes:equals() and hashcode(). But the problem that javaFX tableview can't hold an observable set: tableView.setItems(FXCollections.observableSet(new hashSet<T>()); I also planned to calculate the some for a columns in my tableview so, i need // After change in element T the total will

Wrong TableView header width when using TableView.CONSTRAINED_RESIZE_POLICY

倾然丶 夕夏残阳落幕 提交于 2019-12-12 18:24:44
问题 It's actualy a known bug and steel opened a bug report for JavaFX, which you may found here. Description is: When ColumnResizePolicy is setted to CONSTRAINED_RESIZE_POLICY and table have data that is not fit in available tableview's height (vertical scroll is visible) then headers have improper width - but only when TableView is not focused. When TableView get focus then headers are getting proper width. The problem is, I really need to fix it somehow, but i can't find any workaround to do

Wrapping text in a JavaFX TableView editable TextFieldTableCell

元气小坏坏 提交于 2019-12-12 18:17:53
问题 My TableView consists of several columns and wraps the text with the following cellfactory: private void setWrapCellFactory(TableColumn<CustomObject, String> table) { table.setCellFactory(tablecol -> { TableCell<CustomObject, String> cell = new TableCell<>(); Text text = new Text(); cell.setGraphic(text); text.wrappingWidthProperty().bind(cell.widthProperty()); text.textProperty().bind(cell.itemProperty()); return cell; }); } This works perfectly for showing uneditable text. The last column

Passing values between ViewControllers based on list selection in Swift

爱⌒轻易说出口 提交于 2019-12-12 17:24:30
问题 I'm trying to pass the selected index number of a listView selection from one ViewController to another but am running into an issue with the tableView didSelectRowAtIndexPath delegate runs slightly later than the prepareForSegue function. Basically, in didSelectRowAtIndexPath, I seta variable, which is then picked up in the prepareForSegue. The issue is that prepareForSegue seems to run the second that the cell is selected and before the didSelectRowAtIndexPath function is called so my

JavaFX TableView with highlighted text

倾然丶 夕夏残阳落幕 提交于 2019-12-12 17:19:35
问题 I want to highlight parts of text displayed in a JavaFX TableView . Till now i'm using Text objects in TextFlow objects. To highlight specific parts in a text i am using tags to cut the text in parts ( javafx.scene.text objects) to highlight or not to highlight with the following code. col3.setCellValueFactory(new PropertyValueFactory<RegexMatch, String>("text")); col3.setCellFactory(new Callback<TableColumn, TableCell>() { @Override public TableCell call(TableColumn param) { TableCell cell =

Scroll tableview cell in cube effect in iOS?

╄→гoц情女王★ 提交于 2019-12-12 17:15:20
问题 Writing up an code for creating table view in such a manner when user scroll table view it behaves like cube. Please find below youtube link for the vision what I am asking for: http://www.youtube.com/watch?v=hrBxHq83yKQ Meanwhile, I tried with CATransform3D transform = CATransform3DMakeRotation(angle, 1, 0, 0); and it working for adding up an row at the top but not for scrolling. Further, due to lack of knowledge of OpenGLES I can not go with it for rotating the cubes with touch gesture.