Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Leading zero in format ignored?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Leading zero in format ignored?

 Post Reply Post Reply
Author
Message
RobinG View Drop Down
Groupie
Groupie


Joined: 07 May 2006
Location: United Kingdom
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobinG Quote  Post ReplyReply Direct Link To This Post Topic: Leading zero in format ignored?
    Posted: 20 September 2006 at 12:03pm
Hi
 
Im using the proprty grid to display prices, so I request formatting to two decimal places with the example below:
 
Dim i As XtremePropertyGrid.PropertyGridItemDouble
Set i = PropCategory.AddChildItem(PropertyItemDouble, COL_HDR_PRICING_RETAIL, 0)
i.Id = 1 + COL_POS_PRICING_RETAIL
i.Format = "%0.02f"
 
 
The problem is, that if the data is 2.00 - the propery grid show it as "2" not "2.00" like i want, if data is 2.34, then it correctly shows "2.34" - basically, the leading zero is not working.
 
The documentation doesnt say its possible, but I figured its "standard" printf() formatting but unfortunatly it does work - is there any way to achive this?
 
Im using 9.81 (still...!)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 September 2006 at 1:47pm
Try set
i.UseSystemDecimalSymbol = False
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Miles View Drop Down
Newbie
Newbie


Joined: 05 January 2011
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Miles Quote  Post ReplyReply Direct Link To This Post Posted: 05 January 2011 at 1:52am
Is there a workaround to this? I need to use Format = "%01.03f" to force three 0's after the decimal separator (e.g. 33.000), but I also need to set UseSystemDecimalSymbol = True to support international locales where they use comma as the decimal separator. It seems that you still need so set UseSystemDecimalSeparator = False. Thanks!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.