<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 09/02/12 14:53, Albert Thuswaldner wrote:
<blockquote
cite="mid:CAN7i3tkSHxzyS34AdNZtqNtU+X-a3qnUBsuhxMGeQ_do4qV3Lg@mail.gmail.com"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap="">If it was up to me I would go for the visual bell. Any thoughts on this?</pre>
</div>
</blockquote>
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 ;-) <br>
<br>
e.g. <br>
<br>
// Revert to last good Prefix<br>
Selection aSel( 0, maOldPrefixValue.getLength() );<br>
pEdit->SetText( maOldPrefixValue, aSel );<br>
<br>
Not sure what others think about above but if I hear no real
negative reaction then I'd be inclined to push this<br>
<br>
p.s. of course you can use the 'Selection' <br>
Selection aSel( maOldPrefixValue.getLength(),
maOldPrefixValue.getLength() ) <br>
<br>
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 )<br>
<br>
<blockquote
cite="mid:CAN7i3tkSHxzyS34AdNZtqNtU+X-a3qnUBsuhxMGeQ_do4qV3Lg@mail.gmail.com"
type="cite">
<div class="moz-text-plain" wrap="true" graphical-quote="true"
style="font-family: -moz-fixed; font-size: 12px;"
lang="x-western">
<pre wrap="">
Thanks for reading my ramblings. <span class="moz-smiley-s3" title=";)"><span>;)</span></span>
/Albert
</pre>
</div>
</blockquote>
thanks for taking the time with this nice addition<br>
<br>
Noel<br>
</body>
</html>