|
-
Jan 25th, 2017, 06:06 AM
#1
Thread Starter
Lively Member
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
-
Jan 25th, 2017, 06:24 AM
#2
Fanatic Member
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 ?).
-
Jan 25th, 2017, 06:36 AM
#3
Thread Starter
Lively Member
Re: LineShape, RectangleShape ect Dont work correctly in Panel Container
 Originally Posted by LuckyLuke82
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.
-
Jan 25th, 2017, 07:58 AM
#4
Fanatic Member
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 ?
-
Jan 25th, 2017, 03:21 PM
#5
Thread Starter
Lively Member
Re: LineShape, RectangleShape ect Dont work correctly in Panel Container
 Originally Posted by LuckyLuke82
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
-
Jan 25th, 2017, 03:38 PM
#6
Fanatic Member
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.
-
Jan 25th, 2017, 04:45 PM
#7
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
 
-
Jan 27th, 2017, 02:34 AM
#8
Re: LineShape, RectangleShape ect Dont work correctly in Panel Container
 Originally Posted by Shaggy Hiker
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
-
Jan 27th, 2017, 11:09 AM
#9
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|