Cancel
Showing results for 
Search instead for 
Did you mean: 

Block Styler Dialog button re-size

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Hi All,

 

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:

ButtonResize.jpg

Thanks,

Mani

9 REPLIES 9
Highlighted

Re: Block Styler Dialog button re-size

Gears Phenom Gears Phenom
Gears Phenom

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:

ButtonLayout.png

 

 

 

 

 

 

 

 

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.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Dell 7530 Precision, Win10, 32GB. Developing in: Java | C | KF
Production: [NX12.0.2 MP1]

Re: Block Styler Dialog button re-size

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

Hi Inch,

 

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.

Re: Block Styler Dialog button re-size

Gears Phenom Gears Phenom
Gears Phenom

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.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Dell 7530 Precision, Win10, 32GB. Developing in: Java | C | KF
Production: [NX12.0.2 MP1]

Re: Block Styler Dialog button re-size

PLM World Member Legend PLM World Member Legend
PLM World Member Legend

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'.

Re: Block Styler Dialog button re-size

Gears Phenom Gears Phenom
Gears Phenom

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.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Dell 7530 Precision, Win10, 32GB. Developing in: Java | C | KF
Production: [NX12.0.2 MP1]

Re: Block Styler Dialog button re-size

Legend
Legend

12354.jpg

 

You Can do this through Dialog attachment.

伊尔凡

Re: Block Styler Dialog button re-size

Gears Phenom Gears Phenom
Gears Phenom

But the OP wanted both of the buttons to grow to fill the space between them.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Dell 7530 Precision, Win10, 32GB. Developing in: Java | C | KF
Production: [NX12.0.2 MP1]

Re: Block Styler Dialog button re-size

Experimenter
Experimenter
Why not just use winForms?

Re: Block Styler Dialog button re-size

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled