-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen artifact/trail when dragging/resize a border #79
Comments
Might be the order they are added in the Designer, so the "Drag context" thinks it needs to go to the top of the form. Just a guess. |
Thanks for the reply, Smurf. I just took a look at Designer.cs and tried to rearrange things... No use :( Do you have any other suggestion or tip? So let me describe the problem in details -- The problem exists in every example included in the toolkit (with a drag-able border).. Every time I press the left mouse button and try to drag the border, black lines would appear on the top.. Sometimes even after I let go of the mouse button, the black lines remain on the screen. The problem only affects Win10 system (my laptop). The border-dragging operation works correctly on my Win7 desktop. Did anyone else encounter the same problem (or able to replicate this issue)? I really want to use Krypton toolkit for my application, but can't really use it unless I solve this issue. Any help will be much appreciated. |
BTW, this is a brand new laptop with Win10 installed. So it cannot be a graphic memory issue. The issue only affects Krypton toolkit (and the border-dragging works fine for Visual studio.. etc).. |
Hi I have tested the demo apps right now on my Win10 (with Intel and NVIDIA graphics Card) - it is also a Laptop - altough an older one - an no such artefacts appear. I would then tend to think that this is a graphics Driver Problem. What Kind of graphic Card is in your Laptop? With Kind regards, John |
Hi John, I have nVidia Geforce 1070 Ti, with latest graphics driver installed. And it's a HP Omen 17.3'' laptop I just bought. That actually makes sense because I couldn't reproduce the artifacts on my older desktop with win7 either. Incidentally, I've tried some other winform components (Syncfusion.. DevExpress.. etc), and none of them have given me such problem. It's giving me headache as I'd rather use the free Krypton suite instead. :( |
I downloaded my nVidia driver directly from nVidia. The only thing that's been giving me problem is the Krypton demos. Could someone else with the latest nVidia graphics card and driver try the demo and see if you can reproduce the problem? Thanks. |
I have the same problems on two computers (different nvidia cards) on my app. I didn't have this problem before. |
Yes! I first noticed the problem right after I reinstalled my Win10, so I suspect it might have something to do with one of the updates. Let me go check and see if I have the fall creators update.. BTW -- this problem pretty much makes the toolkit unusable to me. Do you have any idea how to fix this? :( |
Can someone else with Win10 and latest updates pitch in and give us your input? The error only exists on my Win10 box with latest updates, and not my old Win7 system. So I suspect it might be windows update-related, just like Cocotteseb mentioned. Could someone else verify this? |
FYI, I have nVidia GeForce 1070Ti with latest graphic driver, and latest windows 10 updates installed. |
I expect there is a good chance this fix I suggested here could solve your issue. The method this library uses to hide updates is unusual and seems to have some issues. The issue I was solving with that fix was near identical to the one you're describing. |
This drives me nuts. in SeparatorController.cs However I do not understand why on the latest Win 10 builds it does not longer work and how to overcome this issue. In
|
Hi @Cocotteseb, I was just looking at your solution, but I can't figure out where you get the _drawIndicator variable from? I am working on the .NET framework 4.7 port with @Smurf-IV, and trying to implement your fix. Any help is appreciated, and you will get credited for your assistance. |
In your code you have automatic property : I have So just use DrawMoveIndicator in your code. |
Hi @Cocotteseb Many thanks for the response. I have implemented the fix into the port, and have credited you for you work. |
I had the same issue with the artifacts on both my home computer and work computer. I downloaded the the latest version with same problem. I was able to sidestep the issue by creating a window with the initial rectangle region of the slider bar. It works on all computers. I only modified SeparatorController.cs file using a static drag bar class. Very easy to follow and add. I just need to know where to upload it. |
Here is the static drag bar class. ` /// /// This class has been created to remove the function /// ControlPaint.FillReversibleRectangle(drawRect, Color.Black); /// I have continued have have artifacts drawn on the screen /// when dragging splitter bars. /// public class DragObject { static System.Drawing.Color _BarColor = System.Drawing.Color.Red; static Control _ctrl = null; static ViewBase _Target = null; static Control _parent = null; public static void Hide() { if (_ctrl != null) { _ctrl.Parent.Controls.Remove(_ctrl); _ctrl.Hide(); _ctrl.Dispose(); _ctrl = null; _parent = null; _Target = null;
` |
Many thanks for the code that you have provided me. I'll implement it into the Krypton-NET-470, 471, 472 and 480 codebases today with credit of you for your work. |
I am really glad that there is a central area where updates can be added to
this great library. I am hoping that some one with more experience with the
themes can set the color attribute of the bar. I just hard-coded red.
…On Tue, Jul 3, 2018 at 6:43 AM Phil Wright ***@***.***> wrote:
Closed #79 <#79> via
53181c7
<53181c7>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWJm1G5zr4EkOoEkJijfbO41SmvcSwZ3ks5uC1j8gaJpZM4QeUb->
.
|
I'll try to make it a property to define. I think it is fairly easy to hook it into the palette colours, but I need some time to figure it out. |
I'm using the latest Krypton build which has the new splitter dragging code, but I run into a problem with docking; if I have a docking area which has for instance 4 panels, one big at the top and 3 smaller below (see image), when I drag the large horizontal spitter to resize the top panel, the splitterbar is not shown while dragging. It seems as if it is behind the panels and not correctly shown on top. Dragging the vertical splitters between the bottom panels works fine but is also not shown while dragging the splitter at the right of the top panel. Anyone has any idea what the problem might be and how to fix it? |
I played around a bit with the new splitterbar code and I sort of found the problem; the _parent control that is found doesn't seem the correct one. This control also doesn't have the "Name" property set....so I added the following code to "// Get parent of dragbar control. Find a parent that"
Complete code of sub "Show" is now:
This has fixed my problem of the splitterbar not being shown while dragging. Maybe this is not the best way to fix it, so if anyone has a better way I'm all ears! |
That seems like a good idea to me.
…On Fri, Jul 13, 2018 at 3:50 AM Ton Trommelen ***@***.***> wrote:
I played around a bit with the new splitterbar code and I sort of found
the problem;
the _parent control that is found doesn't seem the correct one. This
control also doesn't have the "Name" property set....so I added the
following code to "// Get parent of dragbar control. Find a parent that"
while ( _parent.Name == "" )
{
_parent = _parent.Parent;
}
Complete code of sub "Show" is now:
/// <summary>
/// Shows the specified target.
/// </summary>
/// <param name="target">The target.</param>
/// <param name="screenRect">The screen rect.</param>
public static void Show(ViewBase target, Rectangle screenRect)
{
//
// If for some reason, our target has changed, remove old control
//
if (_target != null)
{
if (_target != target)
{
Hide();
}
}
//
// Create dragbar control
//
if (_ctrl == null)
{
_ctrl = new Control() { Visible = false, BackColor = _barColour };
//
// Get parent of dragbar control. Find a parent that
// supports children. Some controls have read only
// child collections.
//
_parent = target.OwningControl;
while (_parent != null)
{
try
{
while ( _parent.Name == "" )
{
_parent = _parent.Parent;
}
_ctrl.Parent = _parent;
_parent.Controls.Add(_ctrl);
break;
}
catch (NotSupportedException)
{
_parent = _parent.Parent;
}
}
}
//
// Position dragbar control
//
Rectangle rect = _parent.RectangleToClient(screenRect);
_ctrl.Location = rect.Location;
_ctrl.Size = rect.Size;
_ctrl.BringToFront();
if (_ctrl.Visible == false)
{
_ctrl.Show();
}
//
// Force a redraw
//
_ctrl.Invalidate();
}
}
This has fixed my problem of the splitterbar not being shown while
dragging.
Maybe this is not the best way to fix it, so if anyone has a better way
I'm all ears!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWJm1Bcdxnns3AJAm1fQ57vQhtlvWxsTks5uGF87gaJpZM4QeUb->
.
|
I think that I have updated my branches with your fix. Please could you highlight the differences? |
I"m sort of new on github.....what do you mean with "highlight the differences"? |
Sure, what I meant was what did you change from the original method code? |
I have changed to the new code you provided and have tested it in an
application that only uses splitters. However, in some of my other
applications, I have used a number of docking panes, but excluded the
splitter because of drawing artifacts. I guess I can combine them now.
…On Thu, Jul 19, 2018 at 11:56 AM Peter Wagner ***@***.***> wrote:
@phlexss <https://github.com/phlexss>
Sure, what I meant was what did you change from the original method code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWJm1JNe-tzkEmlsgZRgcwaa7XIMqbydks5uILpGgaJpZM4QeUb->
.
|
The code I added is;
(see earlier comment) |
Thanks will add it ASAP, I'm waiting for @ComponentFactory at the moment to merge the changes to hopefully get this repo back to a more stable state, before integrating this code. |
* * Decoupled the designer DLL from rest of toolkit * * Remove BIN folder * * Update README.md * * In development * * Redo * * Palette upgrade tool * * Remove locks * * Removal of app * * Working Design.dll * * Remove build directory * * Remove VS blocks * * Fix #79 * * Code reset * * Last known working build * * Instructions * * Small changes * * Try to resolve conflict
Hi guys,
I was running the samples, and I encountered a problem that is driving me crazy. When I tried to resize the panel by dragging on the border, some black lines/visual artifacts appeared above the panel, and wouldn't go away until I let go of left mouse button. You can see a picture of it below:
The strange thing is it only happened on my Win10 system, and I couldn't reproduce it on my Win7 box. So I suspect it might have something to do with a particular setting in Win10. Could anyone tell me how to get rid of those annoying black lines?
Thanks!
The text was updated successfully, but these errors were encountered: