4 Replies Latest reply on Mar 16, 2009 4:16 PM by BobFromTheYear5K

    horizontalAlign being ignored?

      I've run into a small problem that has me somewhat vexed @ the moment. I'm wondering if anyone else has encountered this and could maybe point me towards a solution.

      I'm building a custom Dialog based on a VBox. Inside the VBox is a Canvas that holds most of the visible dialog components. One of which is an HBox acting as a button bar along the bottom of the dialog. The bar contains 4 buttons, all with "visible=false" & "includeInLayout=false". The buttons do not become visible unless some label text is assigned.

      I'm trying to center the visible buttons in the button bar, but setStyle( "horizontalAlign", "middle" ); appears to be having no effect. I don't get it. Aligning them vertically is working just fine.

      I've drawn a border around the button bar just to verify that it's expanded out to the width of the dialog (it is). I've tried centering the buttons both before and after they become visible, but with no luck. Relevant code is below...