Skip to content
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

[Bug] For KForm borders: Cannot "Turn Off border draw" #510

Closed
Smurf-IV opened this issue Dec 5, 2021 · 2 comments
Closed

[Bug] For KForm borders: Cannot "Turn Off border draw" #510

Smurf-IV opened this issue Dec 5, 2021 · 2 comments
Labels
answered This question has been adequately answered. bug Something isn't working

Comments

@Smurf-IV
Copy link
Member

Smurf-IV commented Dec 5, 2021

Note: Please generate a new Bug for the form borders with a specific example just for that

Are the KForm borders messed up?

Comment based on Original title and comment in original description. This fix is "Just" for the DataGrid borders (Cell's / rows / headers)

For KryptonForm look at PaletteBorder.cs

public Color Color1
{
	get => _storage?.BorderColor1 ?? Color.Empty;

	set
	{
		if (_storage != null)
		{
			if (_storage.BorderColor1 != value)
			{
				_storage.BorderColor1 = value;

                                // add this to correct behaviour.
				if (Draw == InheritBool.True)
				{
					OnPropertyChanged("Color1");
					PerformNeedPaint();
				}
			}
		}
		else
		{
			if (value != Color.Empty)
			{
				_storage = new InternalStorage
				{
					BorderColor1 = value
				};
 
                                // add this to correct behaviour.
				if (Draw == InheritBool.True)
				{
					OnPropertyChanged("Color1");
					PerformNeedPaint();
				}
			}
		}
	}
}

Originally posted by @mbsysde99 in #499 (comment)

@Smurf-IV Smurf-IV added the bug Something isn't working label Dec 5, 2021
@mbsysde99
Copy link

public Color Color1
{
	get => _storage?.BorderColor1 ?? Color.Empty;

	set
	{
		if (_storage != null)
		{
			if (_storage.BorderColor1 != value)
			{
                                // add this to correct behaviour.
				if (Draw == InheritBool.True)
				{
    				        _storage.BorderColor1 = value;
				}
                                else {
    				        _storage.BorderColor1 = Color.Transparent;
                               }
          		       OnPropertyChanged("Color1");
			       PerformNeedPaint();
			}
		}
		else
		{
			if (value != Color.Empty)
			{
				_storage = new InternalStorage
				{
					BorderColor1 = value
				};
 
                                // add this to correct behaviour.
				if (Draw == InheritBool.True)
				{
    				        _storage.BorderColor1 = value;
				}
                                else {
    				        _storage.BorderColor1 = Color.Transparent;
                               }
          		       OnPropertyChanged("Color1");
			       PerformNeedPaint();
			}
		}
	}
}

@Smurf-IV Smurf-IV self-assigned this Dec 19, 2021
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label Dec 19, 2021
@Smurf-IV
Copy link
Member Author

It appears that the borders can be turned off by just setting "Draw" to False.
This might be because of the recent fixes, but is this what is required ?
@mbsysde99 Please Retest in a nightly Greater than today (353) and reopen if necessary.

FormBorderOnOff

@Smurf-IV Smurf-IV removed their assignment Dec 19, 2021
@Smurf-IV Smurf-IV added answered This question has been adequately answered. and removed under investigation This bug/issue is currently under investigation. labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered This question has been adequately answered. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants