• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Wings 3D v
« Previous 1 2 3 4 5 6 … 13 Next »
Does Wings or WxWidgets filter out \r and \n from PASTE?

 
  • 0 Vote(s) - 0 Average
Does Wings or WxWidgets filter out \r and \n from PASTE?

ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#1
02-20-2017, 02:02 PM
Does Wings or WxWidgets filter out \r and \n from PASTE?

I'm trying to paste into a wide text control in WINGS ...
pasting from a spread-sheet column of numbers using CUT/PASTE.


I only get the first CELL of data . I could like to get all the cells.

Maybe there is a place in the code I can look that would control this behavior.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#2
02-20-2017, 04:35 PM
(02-20-2017, 02:02 PM)ggaliens Wrote: I'm trying to paste into a wide text control in WINGS ...
pasting from a spread-sheet column of numbers using CUT/PASTE.

I only get the first CELL of data . I could like to get all the cells.
As know, that is the usual behaviour in Windows.
In a single line control, if we try to past multiple lines then only the first one is "accepted". That you want just works only for multiple line controls.

At the Windows' API documentation for Edit Controls Style we see that ENTER isn't managed by single-line controls:
Quote:ES_WANTRETURN
Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box's default push button. This style has no effect on a single-line edit control;
...
ES_MULTILINE
Designates a multiline edit control. The default is single-line edit control.

When the multiline edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the ES_WANTRETURN style;

and specifically for wxWidgets - wxTextCtrl:
Quote:wxTE_PROCESS_ENTER:
The control will generate the event wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used to activate the default button of the dialog, if any);
...
wxTE_MULTILINE:
The text control allows multiple lines. If this style is not specified, line break characters should not be used in the controls value.
Basically the same thing.

As Wings3D doesn't have any need for multiple line controls they doesn't exists in wings_dialog.erl module (1386 and 1464).
So, probably you will need to manage the clipboard by your self. Maybe adding a button to do that using the wxClipboard class. Just an idea.


Maybe dgud could bring more details.
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#3
02-22-2017, 10:48 AM
(02-20-2017, 04:35 PM)micheus Wrote: As Wings3D doesn't have any need for multiple line controls they doesn't exists in wings_dialog.erl module (1386 and 1464).
I'd sure find a use for multi-line text boxes in my RenderMan exporter =)
Could you add support for them?
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#4
02-22-2017, 05:13 PM
"As know, that is the usual behaviour in Windows."

Not from having checked a few applications on my desktop. They seemed to replace
\r \n with spaces ... or just pasted them into the field and let chips fall where they may.

These app did not just accept only the first item and then bail remove the remainder.
micheus
Offline

Forum's Admin and Support | Bug fixer
Posts: 3,681
Threads: 185
Joined: Jun 2012
#5
02-22-2017, 09:48 PM
(02-22-2017, 05:13 PM)ggaliens Wrote: "As know, that is the usual behaviour in Windows."

Not from having checked a few applications on my desktop.
Just to best explain my words: dialogs that uses single line controls tend to ignore extra lines. For example, in some MS apps a text control used for search content do that. check MS Word, Wordpad, Notepad and Start menu->Search Bar. Also, the Calc will past the last row value only.

I think that if the app doesn't intend to manage/accept multiple content in a single line control, it will work that way - and it's the logical way for me. You probably was testing apps in which that is expected/accepted.
[Image: tw.png] @MicheusVieira [Image: yt.png] @MicheusVieira [Image: da.png] Micheuss [Image: ig.png] micheus4wings3d
* Wings3D Team stands for: Björn and Dan
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#6
02-23-2017, 12:49 AM
OK ... maybe microsoft text control is conspiring against me.

It is true. I tried several other "controls" ... that appears as single line ...
like search bars and such. They all worked the way I wanted ... but they might not be MFC
or microsoft plain-old control.
« Next Oldest | Next Newest »

Users browsing this thread: 7 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode