[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: Inserting a line break when editing a WrappingLabel
|
Louis,
you have to modify the corresponding
EditManager.
Setting the textwrap to true
only makes the wrappinglabel capable of displaying multiline
text.
Inserting manual line-breaks while editing you
will have to do the following:
In your LabelEditPart, that should allow wrapping,
modify
protected DirectEditManager getManager()
{
if (manager == null)
{
setManager(new TextDirectEditManager(this, WrapTextCellEditor.class,
XXXEditPartFactory.getTextCellEditorLocator(this)));
}
return
manager;
}
In combination with setting textwrap to true in the
createcontent-method of the parent EditPart, this shouls do the
trick.
HTH & regards
Thomas
> Hi all,
>
> I was wondering if it is possible to insert a line break when editing a
> WrappingLabel in GMF? I've tried various keystrokes (Enter, CTRL+Enter,
> SHIFT+Enter and ALT+Enter), but none seem to work.
>
>
I've set the text wrap property of a WrappingLabel to true - and text is
> being wrapped correctly - but I would like to insert line breaks to
> control when text is to be wrapped.
>
> Best
regards,
> Louis.
>