cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Right alignment for content of input panel using toolkit

Ketan_Lalcheta
19-Tanzanite

Right alignment for content of input panel using toolkit

Hello

 

We have UI dialogue and on the same, we have kept input panel. Using toolkit, can we set alignment of text to right justified?

 

If any API is not there, is there any other way to achieve the same? Any thought would be of great help.

 

FYI, I am having Creo 4.0 M030.

 

Thanks and Regards

Ketan

10 REPLIES 10

any thought would be of great help.

Any idea would be of great help...

Any possibility to align value?

Hi @Ketan_Lalcheta 

 

Is this is your requirement? Input panel with right aligned text.

 

Input Value Right Aligned.png

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

Yes... This is what I need... Right aligned text into input panel

@Ketan_Lalcheta 

 

This is simple property. Here my 5 minutes for you!

For detailed steps.

https://creocustomization.com/how-to-right-align-text-in-the-ui-input-panel-in-creo-toolkit/

 

If you're back end editor then just set reading order value into  true

If you're front end editor then just change reading order value into right to left

 

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

this works fine, but it is not proper for negative value.negative sign is also passed at end

Ha ha, another complexity. No issue You can achieve it by dynamic way

 

1. Use ProUIInputpanelFocusoutActionSet() - This will automatically run when user move from current Input box. Now Capture the double value and find the sign of the value

2. If the sign is negative then set the Double Format  value "%.*lf-" using ProUIInputpanelDoubleformatSet()

3. If the sign is positive then set the Double Format Value "%.*lf" using ProUIInputpanelDoubleformatSet()

 

 

Double Value with Format.png

 

Note:

1. Read Order should be set as Right to Left as per previous comment

2. Value type of the Input Box should be Double

 

Enjoy! I will update my article while I am free.

 

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"

Appreciate your effort on this issue!

 

I tried to set format type as "%.*lf-" for negative values , but it doesn't help. Actually it sets value as -45.000000-  i.e. negative sign on both the sides.

 

Additionally, this is possible only for double.Can anything be done for input panel of type integer? 

 

Basically best way to do is for normal input panel as double sets six decimals into input panel.

I took screenshot from UI Editor.

 

2nd Input box is double format as I mentioned in previous post. 

If you really need that option for Integer then round the double value in back end code & update the input box. Creo don't have an option to Integer format. You can control the number of decimals for double to1 (45.0), If you set 0 it will be 6(45.000000) decimal places. So we could not say that is an Integer.

 

So now you can decide either this as limitation with toolkit or you can try any work around Or raise the ticket to PTC may be they have simple solution for this.

 

Parthiban Kannan

href="https://www.linkedin.com/in/parthiban-kannan/" target="_blank"
Announcements


Top Tags