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

Right alignment for content of input panel using toolkit

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

Re: Right alignment for content of input panel using toolkit

any thought would be of great help.

Re: Right alignment for content of input panel using toolkit

Any idea would be of great help...

Re: Right alignment for content of input panel using toolkit

Any possibility to align value?

Re: Right alignment for content of input panel using toolkit

Hi @Ketan_Lalcheta 

 

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

 

Input Value Right Aligned.png

Re: Right alignment for content of input panel using toolkit

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

Re: Right alignment for content of input panel using toolkit

@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

 

Re: Right alignment for content of input panel using toolkit

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

Re: Right alignment for content of input panel using toolkit

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.

 

Re: Right alignment for content of input panel using toolkit

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.