Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Item.Format
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Item.Format

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: Item.Format
    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

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: 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
Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post 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 ...




Back to Top
Marlon View Drop Down
Groupie
Groupie


Joined: 27 December 2011
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marlon Quote  Post ReplyReply Direct Link To This Post 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++
Marlon



Product: Xtreme SuitePro (ActiveX) version 17.2.0

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

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.141 seconds.