Problem with field borderwidth 2

Dar Scott dsc at swcp.com
Fri Dec 31 18:11:11 EST 2004


On Dec 30, 2004, at 1:50 PM, Richard Gaskin wrote:

> Rev now supports native appearances for fields on XP when the field's 
> default values are left in place (borderWidth set to 2).  So what your 
> screen show at <http://www.sanke.org/RevTestPage/>  is showing is XP's 
> rendering of the field border.
>
> You'll see a similar thing on OS X: while the appearance differs from 
> XP, when a field border is set to the default value of 2 OS routines 
> are used to render the control instead of the engine's.
>
> I think this should be overridable.  Standard and Rectangle style 
> buttons also take on native appearances, but you can override this by 
> specifying a backgroundColor.
>
> Perhaps we need a Bugzilla request so that if the borderColor is set 
> the OS no longer draws the control and it uses the engine's internal 
> routines.
>
> Please post the bug number after you log it so we can vote for that 
> enhancement.
>
> In the meantime a workaround is to set the style of the field to 
> "shadow" instead of "rectangle" or "scrolling", and then to prevent 
> the shadow from drawing set its shadowwidth to 0 (zero).  Shadow-style 
> fields are always drawn by the engine, so you should get what you're 
> after with those.

Where did you get all this info?

There is nothing about special native rendering in the dictionary under 
borderWidth or threeD.

Ah, I found it under backgroundColor.

The idea of using backgroundColor to switch between OS rendering and 
internal rendering is pretty weird.  I would never have thought to 
check the dictionary for backgroundColor.

I don't like idiomatic choices.  Choices should be explicit.  A 
property could be used to switch between different rendering methods in 
a control object.

Dar


**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     Programming Services and Software
**********************************************



More information about the use-livecode mailing list