Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Add a new multiline TextArea widget to solve MultiLine TextEntry problem #375

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sevoku
Copy link
Member

@sevoku sevoku commented Aug 10, 2014

(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.

sevoku added 6 commits August 10, 2014 19:16
 * 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.
sevoku added 3 commits January 8, 2015 12:12
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.
@zatherz
Copy link

zatherz commented Jan 8, 2018

Bump

@RodrigoPereyraDiaz
Copy link
Contributor

Any posibility of intergreate this on master?

@sevoku
Copy link
Member Author

sevoku commented Feb 28, 2019

unfortunately this needs a huge rebase now, and I had no time to do that yet :(

@RodrigoPereyraDiaz
Copy link
Contributor

Please take a look to #928

Base automatically changed from master to main March 9, 2021 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants