FXML set TableView column resize policy

前端 未结 1 1056
名媛妹妹
名媛妹妹 2021-01-17 23:54

How can I set a TableView\'s resize policy from FXML? I tired this way, but it\'s not working:



        
相关标签:
1条回答
  • 2021-01-18 00:50

    To set columnresize policy for tableview using fxml , you have to use <columnResizePolicy> tag . This will work on javafx 2.2 and later..

    <TableView>
      <columnResizePolicy><TableView fx:constant="CONSTRAINED_RESIZE_POLICY"/></columnResizePolicy>
    </TableView>
    

    Reference :

    Defining TableView columnResizePolicy property with fxml

    0 讨论(0)
提交回复
热议问题