Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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
any thought would be of great help.
Any idea would be of great help...
Any possibility to align value?
Is this is your requirement? Input panel with right aligned text.
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
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()
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.
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.