Home All Groups Group Topic Archive Search About

Format String Dialog

Author
4 Oct 2006 6:57 AM
Polonio
Visual Stadio IDE uses a dialog box to define format strings...

http://msdn2.microsoft.com/en-us/library/ms171572.aspx

Can I reuse that dialog box on my application? How?

I'have seen the dialog appers (at runtime) if I use a PropertyGrid control
point to a DataGridViewCellStyle... However, the "Format" property is just a
string....  I need the same behavior for a propery of a class I've done...


I've been looking around for hours... Any help apprecieted...

Author
4 Oct 2006 9:28 PM
Polonio
I've found the editor that I need is:

EditorTypeName: "System.Windows.Forms.Design.FormatStringEditor,
System.Design, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"

However, I don't know what references I have to set.... I get an error
message telling me that 'The type  is no defined'

Dim t As Type = GetType(Windows.Forms.Design.FormatStringEditor)


Please... may you check if that code works to you?




Show quote
"Polonio" <polo***@yahoo.com> escribió en el mensaje
news:ufVHkJ45GHA.3452@TK2MSFTNGP05.phx.gbl...
>
> Visual Stadio IDE uses a dialog box to define format strings...
>
> http://msdn2.microsoft.com/en-us/library/ms171572.aspx
>
> Can I reuse that dialog box on my application? How?
>
> I'have seen the dialog appers (at runtime) if I use a PropertyGrid control
> point to a DataGridViewCellStyle... However, the "Format" property is just
> a string....  I need the same behavior for a propery of a class I've
> done...
>
>
> I've been looking around for hours... Any help apprecieted...
>
>
Author
5 Oct 2006 11:07 AM
Dave Sexton
Hi Polonio,

You can't use that class because it's marked as internal to the assembly in which it's defined.

If you want to provide similar functionality you can write your own UITypeEditor implementation.

Implementing a UITypeEditor on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconimplementinguitypeeditor.asp?frame=true

Attach the editor to your property by adorning the property with an EditorAttribute.

--
Dave Sexton

Show quote
"Polonio" <polo***@yahoo.com> wrote in message news:%23wakIw$5GHA.4304@TK2MSFTNGP03.phx.gbl...
>
> I've found the editor that I need is:
>
> EditorTypeName: "System.Windows.Forms.Design.FormatStringEditor, System.Design, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a"
>
> However, I don't know what references I have to set.... I get an error message telling me that 'The type  is no defined'
>
> Dim t As Type = GetType(Windows.Forms.Design.FormatStringEditor)
>
>
> Please... may you check if that code works to you?
>
>
>
>
> "Polonio" <polo***@yahoo.com> escribió en el mensaje news:ufVHkJ45GHA.3452@TK2MSFTNGP05.phx.gbl...
>>
>> Visual Stadio IDE uses a dialog box to define format strings...
>>
>> http://msdn2.microsoft.com/en-us/library/ms171572.aspx
>>
>> Can I reuse that dialog box on my application? How?
>>
>> I'have seen the dialog appers (at runtime) if I use a PropertyGrid control point to a DataGridViewCellStyle... However, the
>> "Format" property is just a string....  I need the same behavior for a propery of a class I've done...
>>
>>
>> I've been looking around for hours... Any help apprecieted...
>>
>>
>
>
Author
5 Oct 2006 9:25 PM
Polonio
Humm.

That what I did not want to do...

Does anyone knows about a public control with that funcionality?



Show quote
"Dave Sexton" <dave@jwa[remove.this]online.com> escribió en el mensaje
news:OB3Q55G6GHA.5068@TK2MSFTNGP06.phx.gbl...
> Hi Polonio,
>
> You can't use that class because it's marked as internal to the assembly
> in which it's defined.
>
> If you want to provide similar functionality you can write your own
> UITypeEditor implementation.
>
> Implementing a UITypeEditor on MSDN:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconimplementinguitypeeditor.asp?frame=true
>
> Attach the editor to your property by adorning the property with an
> EditorAttribute.
>
> --
> Dave Sexton
>
> "Polonio" <polo***@yahoo.com> wrote in message
> news:%23wakIw$5GHA.4304@TK2MSFTNGP03.phx.gbl...
>>
>> I've found the editor that I need is:
>>
>> EditorTypeName: "System.Windows.Forms.Design.FormatStringEditor,
>> System.Design, Version=2.0.0.0, Culture=neutral,
>> PublicKeyToken=b03f5f7f11d50a3a"
>>
>> However, I don't know what references I have to set.... I get an error
>> message telling me that 'The type  is no defined'
>>
>> Dim t As Type = GetType(Windows.Forms.Design.FormatStringEditor)
>>
>>
>> Please... may you check if that code works to you?
>>
>>
>>
>>
>> "Polonio" <polo***@yahoo.com> escribió en el mensaje
>> news:ufVHkJ45GHA.3452@TK2MSFTNGP05.phx.gbl...
>>>
>>> Visual Stadio IDE uses a dialog box to define format strings...
>>>
>>> http://msdn2.microsoft.com/en-us/library/ms171572.aspx
>>>
>>> Can I reuse that dialog box on my application? How?
>>>
>>> I'have seen the dialog appers (at runtime) if I use a PropertyGrid
>>> control point to a DataGridViewCellStyle... However, the "Format"
>>> property is just a string....  I need the same behavior for a propery of
>>> a class I've done...
>>>
>>>
>>> I've been looking around for hours... Any help apprecieted...
>>>
>>>
>>
>>
>
>

AddThis Social Bookmark Button