Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Label.AutoSize - Doesn’t
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Label.AutoSize - Doesn’t
Divers
Thread ID:
00822248
Message ID:
00822248
Vues:
57
I'm using VFP 8.

I placed a label called lblSection on a container. AutoSize is
set to TRUE. The caption is defaulted to an empty string, which
makes it's width 2.

This container has 2 methods, SetCaption and Resize.

The problem is that after I set the caption, the width is still
2. I tried setting the AutoSize to .F. and back to .T., still
no effect.

Why won't the label's Width change?
PROCEDURE SetCaption
LPARAMETERS cCaption

WITH This

  .lblSection.Caption = cCaption
  .Resize()

  ENDWITH

RETURN


PROCEDURE Resize

  WITH This

    .lblSection.Left = (.Width - .lblSection.Width)
	
  ENDWITH

RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform