Fix escaping/unescaping in wxLongStringProperty
wxPropertyGrid::ExpandEscapeSequences() function should convert all valid escape sequences (\r, \n, \t, \\) to the corresponding single characters (CR, LF, TAB, backslash, accordingly) and wxPropertyGrid::CreateEscapeSequences() function should do the reverse operation and convert these raw characters to the corresponding escape sequences. Closes #17896.
This commit is contained in:
@@ -543,8 +543,14 @@ wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000
|
||||
@subsection wxLongStringProperty
|
||||
|
||||
Like wxStringProperty, but has a button that triggers a small text editor
|
||||
dialog. Note that in long string values, tabs are represented by "\t" and
|
||||
line break by "\n".
|
||||
dialog. Note that in long string values, some control characters are
|
||||
escaped: tab is represented by "\t", line break by "\n", carriage return
|
||||
by "\r" and backslash character by "\\". If another character is preceded
|
||||
by backslash, the backslash is skipped.
|
||||
Note also that depending on the system (port), some sequences of special
|
||||
characters, like e.g. "\r\n", can be interpreted and presented in
|
||||
a different way in the editor and therefore such sequences may not be
|
||||
the same before and after the edition.
|
||||
|
||||
To display custom dialog on button press, you can subclass
|
||||
wxLongStringProperty and implement OnButtonClick, like this:
|
||||
|
Reference in New Issue
Block a user