Problem with System.Windows.Forms.Design.FileNameEditor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Polo

    Problem with System.Windows.Forms.Design.FileNameEditor

    Hi,

    I have a class CustomFileNameE ditor that inherits from FileNameEditor
    I override the method "InitializeDial og" to customize the filter property
    When I run the application this method is called only one time.

    The problem is that the filter property can be change for each instance of
    the class that has the CustomFileNameE ditor


  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: Problem with System.Windows. Forms.Design.Fi leNameEditor

    hi,

    it's not clear what you want , you can pass those parameters in the
    constructor and then use then inside the method:

    string var;
    public MyConstructor( string param1 )
    {
    this.var = param1;
    }
    protected override InitializeDialo g( ... )
    {
    this.SomeProper ty = var;
    }


    hth

    cheers,

    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation




    "Polo" <pb@rtech.be> wrote in message
    news:uLIzXkzdFH A.3280@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hi,
    >
    > I have a class CustomFileNameE ditor that inherits from FileNameEditor
    > I override the method "InitializeDial og" to customize the filter property
    > When I run the application this method is called only one time.
    >
    > The problem is that the filter property can be change for each instance of
    > the class that has the CustomFileNameE ditor
    >
    >[/color]


    Comment

    • Polo

      #3
      Re: Problem with System.Windows. Forms.Design.Fi leNameEditor

      In fact, the problem is :

      I assign an object on the property grid, I click on the button to select a
      file the method InitializeDialo g is called
      If I click again on this button the method InitializeDialo g isn't called.
      It's the same if I change the selected objet of the propertyGrid (when I
      click, the method InitializeDialo g isn't called)


      "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us > a
      écrit dans le message de news:OrRZIE1dFH A.584@TK2MSFTNG P15.phx.gbl...[color=blue]
      > hi,
      >
      > it's not clear what you want , you can pass those parameters in the
      > constructor and then use then inside the method:
      >
      > string var;
      > public MyConstructor( string param1 )
      > {
      > this.var = param1;
      > }
      > protected override InitializeDialo g( ... )
      > {
      > this.SomeProper ty = var;
      > }
      >
      >
      > hth
      >
      > cheers,
      >
      > --
      > Ignacio Machin,
      > ignacio.machin AT dot.state.fl.us
      > Florida Department Of Transportation
      >
      >
      >
      >
      > "Polo" <pb@rtech.be> wrote in message
      > news:uLIzXkzdFH A.3280@TK2MSFTN GP09.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I have a class CustomFileNameE ditor that inherits from FileNameEditor
      > > I override the method "InitializeDial og" to customize the filter[/color][/color]
      property[color=blue][color=green]
      > > When I run the application this method is called only one time.
      > >
      > > The problem is that the filter property can be change for each instance[/color][/color]
      of[color=blue][color=green]
      > > the class that has the CustomFileNameE ditor
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...