Cancel
Showing results for 
Search instead for 
Did you mean: 

Disable/Enable Blocks of a Block Styler UI Dialog C# NXOpen

Pioneer
Pioneer

Hi Guys,

 

i have question.

 

The idea is to disable a User Input. Is there a Function to do that ?

 

For Example:

 

if the toggle1 is true.

The user isn't able to input a value into the double field.

(The double Field should be disabled... grey... so that the User can't even click into the Field)

 

Thanks for your Help!!

3 REPLIES

Re: Disable/Enable Blocks of a Block Styler UI Dialog C# NXOpen

Phenom
Phenom

All the blocks inherit from UIBlock which has a method setEnable(boolean).

So whatever block you want to disable simply call:

myBlock.setEnable(false);

As you might imagine, passing true instead re-enables the block.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX11.0.2.7 MP5] & [NX12.0.0.27 MP1]

Re: Disable/Enable Blocks of a Block Styler UI Dialog C# NXOpen

It's not working.
Can you tell me another way?

Re: Disable/Enable Blocks of a Block Styler UI Dialog C# NXOpen

Phenom
Phenom

You're going to have to give me more than 'It's not working'.

Using the setEnable() method is the way to enable/disable the blocks. There is no other way.

Where/when do you call the setEnable() method? Can you supply all/some of the code?

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX11.0.2.7 MP5] & [NX12.0.0.27 MP1]