NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UI customization - delete buttons + resizing window

Solved!
Go to solution

I can't understand why the button remains still visible when I set the option "visible" to "false" in the TestExec.rc

 

Is that set again somewhere after its initialization?

 

0 Kudos
Message 11 of 23
(1,393 Views)

If you have the button still connected to the manager control, visibility is set by that connection during execution of the UI when a sequence is loaded and can be executed.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 12 of 23
(1,388 Views)

Thank you very much, it seems to work.

and what about changing the caption? the string "Single pass" or "ENTRY_POINT_2" is not found anywhere in the files  😞

Thanks,

best regards,

Elena

0 Kudos
Message 13 of 23
(1,384 Views)

These items are ActiveX containers. So they do encapsulate a bunch of functions already.

One is "labeling".

For each control, TS checks its connection and reads out the appropriate label from the language files.

 

You can find the language files in <TestStand Directory>\Components\Language directory. There is by default only an English one.

When generating custom languages, you should move to <TestStand Public>\Components\Language\YourLanguage.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 14 of 23
(1,381 Views)

Hi Norbert,

 

lately I have been interrupted  for some days on my job on TS,so I haven't tried your last suggestion.

However, maybe I did not express myself clearly. I do not want to change the language of the button label. I just want to replace the existing text with something else. For example, I would like to replace "Single Pass" with something like "Execute the test".

In the code I cannot find the place where the string "Single Pass" is written.

 

Sorry if my questions may seem odd, but I am a firmware developer and I rarely develop PC application SW.

Thanks,

Best regards,

Elena Bolzonella

0 Kudos
Message 15 of 23
(1,342 Views)

As i said: The string "Single Pass" is defined in the language files. The ActiveX button element reads out that string per API.

There is no manual way to change that string other than:

- Use a normal button and implement code to interlink that with the TS function (e.g. transfer click to ActiveX button "DoClick" method)

- Modify/Create new language files

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 16 of 23
(1,340 Views)
Solution
Accepted by topic author ElenaB

To change the caption, I changed:

 

this.axSequenceFileViewMgr.ConnectCommand(this.axEntryPoint2Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1, CommandConnectionOptions.CommandConnection_NoOptions);

 

to

 

CommandConnection commandConnection = this.axSequenceFileViewMgr.ConnectCommand(this.axEntryPoint2Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1, CommandConnectionOptions.CommandConnection_NoOptions);


commandConnection.Options |= CommandConnectionOptions.CommandConnection_IgnoreCaption;
this.axEntryPoint2Button.Caption = "Execute the Test";

Message 17 of 23
(1,335 Views)

Thanks James,

 

good to know.

EDIT: Is there a specific reason why you do not set the IgnoreCaption flag directly in the command connection line?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 18 of 23
(1,327 Views)

I only used multiple lines to make the data type apparent in my reply.

0 Kudos
Message 19 of 23
(1,324 Views)

Dear James, 

 

thanks a lot for your suggestion!

Unfortunately, at the moment I cannot proceed and try your solution because my boss told me to work on something else...

However, I hope to resume my UI customization soon and let you know if that works for me too!

 

By the way, have you ever tried the resize of the window also? Our customer wuould like it to be activated. If you could provide suggestion to me also for that, I can try both things at once as soon as I return to work on the UI.

 

Thanks a lot,

best regards,

Elena

0 Kudos
Message 20 of 23
(1,311 Views)