How to center all cells in grid view

59 views
Skip to first unread message

Adam Bicknell

unread,
Mar 7, 2019, 8:19:23 PM3/7/19
to ControlsFX
Hi there,

Could someone please demonstrate how to center all the items / cells within a gridview.

Currently, all are aligned left, and I am struggling to work out the best method for centering these items, without removing the scroll bar, putting it in a stackpane or similar, and then creating my own scrollbar to scroll it... which I imagine will be a nigtmare.

Any help would be greatly appreciated! 

Kind Regards,

Adam

Adam Bicknell

unread,
Mar 14, 2019, 7:14:40 PM3/14/19
to ControlsFX
Can anyone assist?

Adam Bicknell

unread,
Mar 20, 2019, 10:23:48 AM3/20/19
to ControlsFX
Anyone at all?

Abhinay Agarwal

unread,
Mar 22, 2019, 6:05:35 AM3/22/19
to ControlsFX
Hi Adam,

Apologies for the delay in response.

Do you want to center the nodes in the GridCell or center the GridCells in the GridRow?

Best regards,
Abhinay

Adam Bicknell

unread,
Mar 22, 2019, 8:22:49 AM3/22/19
to control...@googlegroups.com
Hi,

Thanks for the reply, im wanting to centre the gris cells in a grid row... so that no matter what the size of the scene is, that they all align to the center (obviously not all in the exact center though as then they'd be on top of each other).

I did see that theres some code to uncomment but couldnt find it,and not sure if its in recent version as the comment at the top of the file was from 2013.

I thought of trying to use padding and such... but cant see to actually affect the alignment of the cells... they're just always position from the left.

Kind Regards,

Adam

--
You received this message because you are subscribed to the Google Groups "ControlsFX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to controlsfx-de...@googlegroups.com.
To post to this group, send email to control...@googlegroups.com.
Visit this group at https://groups.google.com/group/controlsfx-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/controlsfx-dev/36446b2e-b704-4222-8f3c-30d3fa6bebd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Adam Bicknell

unread,
Mar 31, 2019, 4:33:28 PM3/31/19
to ControlsFX
Any luck on a solution?

Adam Bicknell

unread,
Apr 4, 2019, 7:33:24 AM4/4/19
to ControlsFX
Hi Abhinay,

Are you able to point me in the right direction?

Kind Regards,

Adam


On Friday, March 22, 2019 at 10:05:35 AM UTC, Abhinay Agarwal wrote:
Reply all
Reply to author
Forward
0 new messages