I would like to create a buttons equally distributed in the dialog. I already tried with attachement properties which has functionality to do that. Refer the below image for more information:
There is no easy way to achieve this. For complex dialog layouts I often have to resort to using additional Label blocks on the dialog that I can attach things to. For your case I would add 2 labels that display a bitmap whose width is roughly half the dialog width by 1pixel high. Attach one of these two labels to the left of the dialog and the other to the right.
Then attach the left button's LH side to the dialog and its RH side to the RH bitmap and the right button's RH side to the dialog and its LH side to the LH bitmap. It comes out looking like this:
The bitmaps here are coloured red so you can see them, but to make them disappear fill them with Magenta (RGB=255,0,255). If you haven't got anything already I can recommend Paint.NET, a free and quite sophisticated image editor.
I've attached a ZIP file containing an example DLX file with a bitmap I used for the labels. This was created in NX12, but I think it'll open in earlier versions. Either put the bitmap in C:\Temp or edit the path the labels use for the bitmap.
Thanks for your reply.
I had this thought earlier to use the bitmaps. But if user re-sizing the dialog, then the buttons will collide and will not be shown as I expected. I'm looking for some permanent solution.
If the dialog resizes, what do you want the buttons to do? Grow/shrink to fill the full dialog width?
Off hand I can't think of a way to achieve that.
Button has to Grow/shrink to fill the full dialog width - Exactly this is what I want to acheive.
Like Right, Left, Top, Bottom I need a parameter to set it as in 'Center'.
I don't think you'll be able to achieve what you want. Even with a single button on the dialog you cannot get it to grow vertically despite attaching it on all sides to the dialog.
Not quite sure why you want this behaviour, can you expand on that? Maybe there is something else we can suggest.
But the OP wanted both of the buttons to grow to fill the space between them.
1) Selection is a lot easier with Block Styler dialogs
2) "Look and feel" are more consistant with the rest of NX
Not that those issues can't be handled in a Winform dialog
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled