B4J Question Tableview Resize Column Event

I want to create text boxes above the header of the grid to be used as a filter boxes and match the width of the columns even when they are resized

Cattura.PNG
 
Upvote 0
In the Tableview there are many columns and I must necessarily give the possibility to resize them to the user. It is not possible to create an event ColumnResize_Event for the ResizeFeaturesBase class?
 
Upvote 0
alternatively I could create a line of text boxes within the TableView, but if I make a double click on the header of Tableview its text box disappears. Is there a way to solve this problem?
 
Upvote 0
A resize event will not be enough as you will need to move all the other fields as well. Currently there is no resize event.

alternatively I could create a line of text boxes within the TableView, but if I make a double click on the header of Tableview its text box disappears. Is there a way to solve this problem?
Please create a small example and upload it.
 
Upvote 0
Please see the attached example. You can try to do doubleclick in the middle of two header columns to check that the relative object disappers
 

Attachments

Upvote 0
Why are you using FXML layouts?

You can use this code to disable double click on the vertical line:
Code:
  Dim r As Reflector
   r.Target = TableView1
   r.AddEventFilter("TableView1MouseClicked", "javafx.scene.input.MouseEvent.ANY")



Sub TableView1MouseClicked_Filter(e As Event)
   Dim jo As JavaObject = e
   Dim v As Node = jo.RunMethod("getTarget", Null)
   If GetType(v) = "javafx.scene.shape.Rectangle" Then
     Dim m As MouseEvent = e
     If m.ClickCount >= 2 Then
       m.Consume
     End If
   End If
End Sub
 
Upvote 0
Back
Top