Font effect query: Mac and Windows differences

Luis luis at anachreon.co.uk
Mon Sep 11 07:13:29 EDT 2006


Hiya,

Thanks for that, I'll try it out.
Is there anywhere where I can get this behavioural info from, or is this 
the most usual gotcha?

Cheers,

Luis.


Martin Baxter wrote:
> Luis wrote:
>> Hiya,
>>
>> Newbie to the list and Revolution...
>>
>> I started out by playing around with font formatting, wanting to make 
>> a mini text editor, but I've run into an odd problem. The following 
>> Transcript works on the Mac version of the app, but on the Windows 
>> version (compiled as a target) nothing happens:
>>
>> on mouseUp
>>   set the textStyle of selectedText to bold
>> end mouseUp
>>
>> So when I hilight the selected text on the Mac, it works, but in 
>> Windows it doesn't (it will not even let me hilight in the Windows 
>> version!).
>>
> 
> Hi Luis, welcome,
> 
> This is because on Macintosh, buttons don't get focus (by default), but 
> on other platforms they do. So when you click the button on Windows it 
> steals focus from the field and you lose the selection.
> 
> The easy way to stop it doing this is to set the traversalon property of 
> the button to false. Then it won't steal the focus when clicked.
> 
> Martin Baxter
> 
> 



More information about the Use-livecode mailing list