This repository was archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 240
Add a new multiline TextArea widget to solve MultiLine TextEntry problem #375
Open
sevoku
wants to merge
9
commits into
mono:main
Choose a base branch
from
sevoku:add-textarea-widget-rebase
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
* mark TextEntry.MultiLine obsolete Some toolkits (like Gtk) have different widgets for single- and multi-lined text input. This makes it possible to implement multi line text enty backend for those toolkits in a clean way.
Conflicts: TestApps/Samples/Samples/TextEntries.cs Xwt.Gtk/Xwt.Gtk.csproj Xwt.Gtk/Xwt.Gtk3.csproj Xwt/Xwt.csproj
* Gtk2: use interal RenderPlaceholderText extension like TextEntry * Gtk3: use new RenderPlaceholderText extension for Gtk3
Makes the TextArea placeholder text behave like Gtk3 TextEntry.PlaceholderText, which is to hide it, when the text area is focused.
Bump |
Any posibility of intergreate this on master? |
unfortunately this needs a huge rebase now, and I had no time to do that yet :( |
Please take a look to #928 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
(rebased version of #369, dependency to #368 removed)
This is an approach to solve problems with TextEntry.MultiLine in a more clean way. Some Backends (Gtk for now, maybe other in the future) have different widgets for a single- and a multi-line text input (Gtk.Entry vs. Gtk.TextView).
There are some different approaches and ready solutions, but none of them is really clean (see #367 and discussions in #288, lytico#25 and some posts in Forum).
This PR solves the issue by deprecating Xwt.TextEntry.MultiLine and adding a new widget Xwt.TextArea (like in HTML). The most code has been moved to an abstract class Xwt.TextBox which handles everything except the MultiLine property. TextEntry and TextArea are subclasses of Xwt.TextBox and implement only their specific properties (new TextArea.Wrap and deprecated TextEntry.MultiLine)
It is important, that TextEntry.MultiLine has not been removed (only marked with the Obsolete attribute). ITextEntryEventSink is not used by any Backend anymore, but should still be functional (for third party implementations). TextEntry still maps the deprecated TextEntryEvent (replaced by TextBoxEvent), too.