
15/03/2007, 07:11
|
 | | | Fecha de Ingreso: marzo-2004 Ubicación: Copacabana - Colombia
Mensajes: 1.484
Antigüedad: 20 años, 11 meses Puntos: 76 | |
Re: PropertyGrid Quedo asi:
Código:
[Category("Reportes")]
[Description("Ruta donde se encuentran ubicados los reportes.")]
[Browsable(true)]
[Editor(typeof(BuscardorRutas),typeof(System.Drawing.Design.UITypeEditor))]
public string Ruta
{
get { return _RutaReportes; }
set { _RutaReportes = value; }
}
public class BuscardorRutas:System.Drawing.Design.UITypeEditor
{
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
FolderBrowserDialog op = new FolderBrowserDialog();
DialogResult res = op.ShowDialog();
if (res == DialogResult.OK)
return op.SelectedPath;
else
return null;
}
public override System.Drawing.Design.UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return System.Drawing.Design.UITypeEditorEditStyle.Modal;
}
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
{
return true;
}
Saludos
__________________ Si mi respuesta te ha ayudado, agradezco que me regales unos puntos de Karma XD. "Una mujer sería encantadora si uno pudiera caer en sus brazos sin caer en sus manos." (Ambrose Bierce) |