Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
236,233,216
Message
De
06/10/2009 00:09:21
 
 
À
05/10/2009 19:57:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01427677
Message ID:
01427846
Vues:
72
>>>A checkbox's default backcolor is rgb(236,233,216). Its backstyle is 0 (transparent) and its SpecialEffect is 2 (hot tracking), thus showing the image under it. When I change the backcolor to some other value, the transparency is gone. That's fine. If I change back the backcolor to 236,233,216 the transparency is there again. That's also fine. Questions:
>>>
>>>Can I rely on that value 236,233,216? Or is it influenced by e.g. the Themes, Colorscheme or Colorsource property?
>>>
>>>Is this value 236,233,216 a special one with regard to transparency?
>>Peter
>>
>>The VFP default backcolor for a checkbox is RGB(226,226,226) (system colour I suppose)
>>The backcolor should not have any effect if the BackStyle = 0 (Transparent) with and without an image.
>>
>>I have tried different combinations of Themes, SplEffect, Backcolor and BackStyle.
>>
>>The only time I see the BackColor is if the Backstyle = 1
>>
>>There must be something else affecting this.
>
>Hi Bernard
>
>I assume the default varies also with the OS. The values 236,233,216 have been reported in several threads on the internet, so it is not an idiosyncratic value that is only occurring on my machine. Note: It is first seen by me in VFP9 sp1. PC has XP-sp2.

Yes that is a system colour

>
>The backcolor does have effect with specialeffect 2 (hot tracking) and backstyle 0 (transparent) the moment you hoover over or select the checkbox. In case you select, the OS will adjust the color with 35% (from my head) in the upper part. When I programmatically change the backcolor (even slightly), the checkbox is no longer transparent, which makes sense. When I change it back to the original value, the checkbox is again transparent, which also makes sense.

Are you also setting this property Style = 1 (Graphical) ?

That is the only way SpecialEffect will work with this control.

>
>What I do now, is store the initial value in a property, change the backcolor when it is selected and use the stored value to restore the transparency.when it is deselected. What I can't do is set the backcolor in advance. It would not display transparent.

What you are seeing is not transparency. The control and the form have the same (system default) colour so you think it is transparent, when actually it is not.

Just drop a shape control and give it a Red or Green Backcolor and send it behind your Chkbox control and you will see that it is not transparent at all whether Themes are off or on or whatever the setting of SpecialEffect.

The only way to get Transparency, and that too for the label only, and not the checkbox, is to set its style to 0 - Std. where you get no graphic.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform