Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Labels not using the page backcolor
Message
 
 
À
20/01/2005 06:08:46
David Gibson
Beacons Software
Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978807
Message ID:
00978966
Vues:
32
David,

>It is as though the label is looking at the color of its parent (the container) and matching it but not taking into account that its immediate parent might be transparent and so it should look for the color of its parent's parent (the page).

So why not have your container class grab set it's BackColor to the first non-transparent parent that it can find walking it's way back to the form? A few lines of code in your base container class Init() should solve the issue.
loParent = this.Parent
do while ! isnull( loParent )
   if ( loParent.BackStyle != 0 )
      this.BackColor = loParent.BackColor
      exit
   endif
   if ( loParent.Name != thisform.Name
      loParent = loParent.Parent
   else
      loParent = .null.
   endif
enddo
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform