Customized line-break behaviour [message #521456] |
Wed, 17 March 2010 16:11 |
|
Hi there,
My Problem:
I would like to give my user the opportunity to enter different line-breaks:
a) line-breaks which are only shown in the graphical editor
b) line-breaks which are shown in either the graphical editor and other locations like property-pages, exports and so on
My questions:
1) How could I save which kind of line-break I have? Is there anything like a invisible control character which I could use for case a)?
Or will I have to use some character combination which I have to make invisible in the properypages, exports etc?
2) I already found the place in WrapTextCellEditor where CTRL+Enter is handled. How can I replace the created standard line-break by my character from 1)?
Thanks for your help!
Regards
Matthias
http://www.horus.biz
|
|
|
Re: Customized line-break behaviour [message #521732 is a reply to message #521456] |
Thu, 18 March 2010 15:43 |
|
Well Ive been doing some research on both of my questions:
1) I took U+200B (zero-width space) to save my line-breaks. There is only one big flaw in this method: Every time I place a normal white-space before my U+200B the program freezes completely. As debug-view tells me, that everything is running all right I assume there must be a bug in the swt-platform implementation?
Anybody knows if I can do anything in this case?
Or is there some other character which I could use? I tried some others as well like U+200C,D and U+FEFF, but received the same error...
2) That was not really difficult: I overwrite the doSetValue(), fireApplyEditorValue() and keyReleaseOccured() methods in my CellEditor and refreshLabelText() in my LabelEditPart and do some String.replace()...
http://www.horus.biz
|
|
|
Powered by
FUDForum. Page generated in 0.02895 seconds