Jump to content

APShredder

Members
  • Posts

    1,318
  • Joined

  • Last visited

Posts posted by APShredder

  1. Yep. I even tried recopying it.

    Here's my code:

    using System;
    using System.Collections.Generic;
    using PaintDotNet;
    using System.Text;
    
    namespace ExtractColor
    {
       internal class GradientControlWrapper : UserControl
       {
           ColorGradientControl colorGradientControl;
    
           protected override void OnLoad()
           {
               colorGradientControl = new ColorGradientControl();
               colorGradientControl.Dock = System.Windows.Forms.DockStyle.Fill;
    
               this.Controls.Add(colorGradientControl);
           }
       }
    }
    
    

  2. Ok I think I got it, but I'm still getting an error message saying:

    'ExtractColor.GradientControlWrapper' does not contain a definition for 'Controls' and no extension method 'Controls' accepting a first argument of type 'ExtractColor.GradientControlWrapper' could be found (are you missing a using directive or an assembly reference?)

    My code matches yours exactly so I don't know what the problem is.

  3. As I've been trying to make my latest plugin, I decided to add some Gradient controls to it. But the thing is, every time I go to build it I get error saying:

    'PaintDotNet.ColorGradientControl.BottomColor' is obsolete: 'Use MinColor property instead'

    'PaintDotNet.ColorGradientControl.TopColor' is obsolete: 'Use MaxColor property instead'

    So usually I just go and comment those lines and then I can successful build the plugin. The problem with that though, is every time I change something in the ConfigDialog, they become uncommented. And it's really annoying to have to go back, find the lines that I need, and comment them every time I change anything I the ConfigDialog.

    So I guess my question is, is there a better way to stop those error messages from showing up in the first place?

    Thanks in advance. :D

×
×
  • Create New...