Results 1 to 9 of 9

Thread: LineShape, RectangleShape ect Dont work correctly in Panel Container

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    LineShape, RectangleShape ect Dont work correctly in Panel Container

    VB 2010


    H,

    I have a winform with a splitter control on

    Top panel is fixed, headings etc

    Bottom Panel will have a list of questions so this is scrollable.

    When I try adding Lines or Boxes (PowerPacks Controls) they leave after effects when scrolling up and down. also scrolling seems a little jerky.

    1) anyone know how to stop the after effects with
    2) any way to make panel scroll smother

    Thanks

    Paul

  2. #2
    Fanatic Member
    Join Date
    Nov 2016
    Location
    Slovenia
    Posts
    575

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    My experience with PowerPack controls are bad, bunch of errors. If you just need straight line use "____________" in label instead of Lineshape. You could Draw a Rectangle using labels too (or Groupbox ?).

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    Quote Originally Posted by LuckyLuke82 View Post
    My experience with PowerPack controls are bad, bunch of errors. If you just need straight line use "____________" in label instead of Lineshape. You could Draw a Rectangle using labels too (or Groupbox ?).

    Cheers, I had never used them before, seem ok on a static form but not anything that moves.

  4. #4
    Fanatic Member
    Join Date
    Nov 2016
    Location
    Slovenia
    Posts
    575

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    Cheers, I had never used them before, seem ok on a static form but not anything that moves.
    Believe me that this is not the only issue with them. You'll probably experience in future this too (much bigger issue):
    http://stackoverflow.com/questions/1...sic-powerpacks

    My advice to you is that seriously consider keeping them. What do you wish to draw anyway, maybe I can help you ?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Apr 2014
    Posts
    122

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    Quote Originally Posted by LuckyLuke82 View Post
    Believe me that this is not the only issue with them. You'll probably experience in future this too (much bigger issue):
    http://stackoverflow.com/questions/1...sic-powerpacks

    My advice to you is that seriously consider keeping them. What do you wish to draw anyway, maybe I can help you ?
    Thanks I decided to to use a group box I had for putting the labels etc in

  6. #6
    Fanatic Member
    Join Date
    Nov 2016
    Location
    Slovenia
    Posts
    575

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    Groupbox and a Label.Text was just a first thing on my mind. You can easily draw a rectangle or line on your form too. Not a lot of work, take a look at this:

    https://www.youtube.com/watch?v=xEFs1vAR81c

    Same principle goes for drawing a line.

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,102

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    The biggest advantage of the powerpacks that I'm aware of is the fact that you get lines with events that can be at angles. Technically, you can use labels, as already noted, to draw vertical or horizontal lines, but not so much for other lines. You can draw lines at any angles using GDI, but lines like that are not objects and don't have events associated with them. Technically, you might be able to work out an efficient algorithm to figure mouse over on diagonal lines in form mouse move, but that certainly gets more tricky.

    It all comes down to what you need from the Powerpacks. The issue I ran into is that tooltips get pretty squirrely with the Powerpacks.

    Another question that I'd have is how light lines are relative to labels. Controls can have a fairly heavy cost, and you could easily end up with loads of them if doing something complicated with lines, even if you stuck with horizontal and vertical lines.
    My usual boring signature: Nothing

  8. #8
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    Quote Originally Posted by Shaggy Hiker View Post
    You can draw lines at any angles using GDI, but lines like that are not objects and don't have events associated with them. Technically, you might be able to work out an efficient algorithm to figure mouse over on diagonal lines in form mouse move, but that certainly gets more tricky.
    You don't need an algorithm. Use a GraphicsPath to draw the line, and its IsOutlineVisible method for hit testing. BB

  9. #9
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,102

    Re: LineShape, RectangleShape ect Dont work correctly in Panel Container

    That's still an algorithm, it's just that I don't have to draw it.

    Thanks for the suggestion, though. I'll look into that. I'm using PowerPacks for something, and it works well for me in most ways, but does have one drawback when it comes to tooltips, so I've been contemplating testing alternative approaches.
    My usual boring signature: Nothing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width