Print Page | Close Window

Item.Format

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=6597
Printed Date: 22 May 2025 at 1:21am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Item.Format
Posted By: Albert1
Subject: Item.Format
Date Posted: 08 March 2007 at 10:38am
PropertyGrid version 10.4.2 - VB6

I'm not able to see the "format" property working (I guess it does nothing).
Take a look at this simple code:


Private Sub Form_Load()
Dim Category As PropertyGridItem
Dim ItemNumber As PropertyGridItemDouble

    Set Category = PropertyGrid1.AddCategory("Category")
    Category.Expanded = True
   
    Set ItemNumber = Category.AddChildItem(PropertyItemDouble, "Item", 27.344)
    ItemNumber.Format = "%0.2f"
End Sub


I never get the correct numbering format. Codejock'example (PropertyGrid.vbp) has the same (wrong) behavior. What is wrong?

Thank you

Alberto




Replies:
Posted By: Oleg
Date Posted: 09 March 2007 at 2:55am

Hello,

Set .Value  after you change format:
 
   ItemNumber.UseSystemDecimalSymbol = False
   ItemNumber.Format = "%0.2f"
   ItemNumber.Value = 27.344


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Albert1
Date Posted: 09 March 2007 at 4:20am
Thx Oleg,

it works now. However I'm developing a software for european people and I need .UseSystemDecimalSymbol = True (I forgot to make it clear). So it do not work again ...






Posted By: Marlon
Date Posted: 25 January 2012 at 4:07pm
4 Years ago, and the Problem with .UseSystemDecimalSymbol = True is not fixed. How can I use "," as decimalsymbol?
 
Same Problem in C++
http://forum.codejock.com/forum_posts.asp?TID=11487&title=bug-in-cxtppropertygriditemdouble - http://forum.codejock.com/forum_posts.asp?TID=11487&title=bug-in-cxtppropertygriditemdouble


-------------
Marlon



Product: Xtreme SuitePro (ActiveX) version 17.2.0

     Platform: Windows 10(64bit)
     Language: Access 2007 (VBA)




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net