On 09/02/12 14:53, Albert Thuswaldner wrote:
If it was up to me I would go for the visual bell. Any thoughts on this?
actually thinking about it some more I don't find it unnatural to have
the whole ( reverted ) prefix selected after entering an illegal
character ( I think this is a technique used elsewhere anyway ) In
addition to providing a cue that you have typed something bad this
approach has the added advantage of solving the cursor problem for you
too ;-)
e.g.
// Revert to last good Prefix
Selection aSel( 0, maOldPrefixValue.getLength() );
pEdit->SetText( maOldPrefixValue, aSel );
Not sure what others think about above but if I hear no real negative
reaction then I'd be inclined to push this
p.s. of course you can use the 'Selection'
Selection aSel( maOldPrefixValue.getLength(),
maOldPrefixValue.getLength() )
to trick SetText to display the cursor at the end. This is a bit hacky,
the alternative is you will probably need to modify the cursor position
directly, that is, unless there is some existing public method on Edit (
which there might be but I didn't see in the myriad of 'Edit' methods )
Thanks for reading my ramblings.;)
/Albert
thanks for taking the time with this nice addition
Noel
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice