-
Notifications
You must be signed in to change notification settings - Fork 11
Added fixes provided on the issue section #4
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
Open
Unbreakable-Syntax
wants to merge
11
commits into
RJCodeAdvance:main
Choose a base branch
from
Unbreakable-Syntax:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fix aims to provide a simple condition to check if the rounded textbox either contains the placeholder value or it is actually empty, if it is, the IsEmpty() method will return true. To use it, it is as simple as rjTextBox2.IsEmpty(), this can be used as an evaluation method for database systems to avoid having the false null value issue (where the textbox does not have any input, but the database reads and adds the placeholder text inside the rounded textbox anyway).
This change fixes a bug where, if the control receives a new text in the Texts property, it displays the text, but it is still considered a placeholder which is wrong. This is fixed by first checking if the string is not empty, if yes, remove and disable the placeholder text, and then set the Text property of the textbox to the actual value.
This change makes the custom control to cache the render points necessary for drawing the control itself. When OnPaint() is called and no property that is a factor for rendering has changed (borderRadius for example), OnPaint() will not redraw the control entirely, instead, it will simply reuse the previously calculated data points and recolor the control. This change should (in theory) improve rendering performance for this control.
This also corrects the wrong textbox name issue.
This is an extended application to the cache optimization that I made, this change makes it so that now, OnPaint() will not provide set a new Region to the control everytime, it only does so when the layout has changed.
This change allows the control to have less flickering, I have observed the effects of this change myself and I say it works.
This fix ensures that when the control is stretched out, it will redraw itself properly.
This change allows the textbox to sanitize the input by removing the newline characters. Which can be very annoying to spot and notice since it can break things, such as string evaluators and database entries. This property is used alongside the Multiline property.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies the RJTextBox.cs file to include all the fixes indicated in the Issues section of the project.
The fixes are: