How to set the default column width for spreadsheetView

405 views
Skip to first unread message

shugang guo

unread,
Jun 9, 2014, 9:05:28 PM6/9/14
to control...@googlegroups.com
When I try to use the spreadsheetview, all things work well but I haven't found an api to set the default width or preferred width for one column, if the cell has context, it is not an issue, but if not, you will find the column width is too small to use. Does anyone know a way to do such set?

samir.ha...@gmail.com

unread,
Jun 10, 2014, 3:34:04 AM6/10/14
to control...@googlegroups.com
Hi Shugang,

I don't really understand what you mean by "context", maybe something inside. Anyway, if the column is too small for you, you can use the "setPrefWidth(double value") on the SpreadsheetColumn you want. To get those SpreadsheetColumn, just use the "getColumns()" method on the SpreadsheetView.

Don't forget to look around in the javadoc here to find examples and documentation: http://controlsfx.bitbucket.org/

Best regards,

shugang guo

unread,
Jun 10, 2014, 4:43:06 AM6/10/14
to control...@googlegroups.com
Thank you so much, I just test it, it works well. Yeah, I already try to see the document but haven't found this info, I guess it is because I'm not familiar with this component, I will continue to try to find answer in javadoc, thank your kindly reminder.

Regards,
Shugang

shugang guo

unread,
Jun 10, 2014, 4:53:35 AM6/10/14
to control...@googlegroups.com
Thank you very much, it works well and I can use it to set the column width, thank your kindly reminder, I will try to look around the javadoc when I have issues.


On Tuesday, June 10, 2014 3:34:04 PM UTC+8, samir.ha...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages