Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
236,233,216
Message
From
06/10/2009 20:33:41
 
 
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01427677
Message ID:
01427960
Views:
96
This message has been marked as a message which has helped to the initial question of the thread.
Deleted the unrelevant parts...

>>>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.
>
>In the case of Style is 1 (graphical) there is transparency. This can be proved by using a picture for the background of the form.

Peter, you are partly right. What they (people who wrote vfp) have done is really weird.

Just try this. Set the Picture property of your form to an image. Your chkbox now looks transparent.
Add a container to your form. Set its picture to another different picture.
Now copy your Graphical transparent chkbox and paste it inside the container.
Resize the container and drag the original chkbox so that it is now positioned over the image in the container.

The weird thing is that it now still shows the background of the form painted on it but it is obvious it is no longer transparent or it would show the picture of the container. Also the same control you pasted into the container now appears non transparent.

This also happens if you do not have a picture property of your form but change its BackColor to something else. The Chkbox now assumes the colour of the Form.BackGround provided you have left the chkbox.Backcolor to the system default.

Looks like they cheated when they programmed the chkbox control and you have found them out.

The Chkbox control, if placed directly on a form, and has a Style = 1 property set, and has the default Backcolor, always assumes the background picture/colour of the form - either an image or a colour.

Nice find.

Bernard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform