How to draw a gradient on a panel

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50569
    Support
    Keymaster

      Hello!

      Maybe you can use the GradientFill function from Windows API?

      http://msdn.microsof…v=vs.85%29.aspx

      Sample of using you can find in the sGradient.pas file.

      This function is very powerfull, I think.

      #50575
      CheshireCat
      Participant

        Hello,

        nice API-Call, but it cannot draw a gradient with different angles. Take a look to my attached demo, it shows an example how you can use GDI+ functions for drawing gradients. I hope this is what you've been looking for.

        [attachment=6334:gradient.jpg] [attachment=6335:DrawGradient.zip]

        #50576
        Support
        Keymaster

          I think, such gradient drawing is possible with this function, but maybe I'm wrong 🙂

          #50578
          Hamilton
          Participant

            Thank you both for the suggestions. Apologies that I ended up asking a non-AC question in these forums, I had thought there might be a library I had overlooked. Anyway I really appreciate you both taking the time to reply to an off-topic message as this turned out to be.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.