Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: VFP bombs with autosizing labels
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00824989
Message ID:
00825070
Vues:
26
Mike,

>it shouldn't diminish the importance of fixing this very nasty bug. When one of these C00000FD errors strikes, the application is instantaneously obliterated.

Most definately agreed, app crashing behavior must be eliminated.

>Consider the problem of labeling shortcut icons as they appear on the Windows desktop, but adding a bit more flexibility.

The Desktop icons are confined to a width that is based on the icon spacing they aren't given free reign in their resizing.

The code you posted is your particular definition of how the combination of these two properties should work together I wouldn't really call it a kludge or workaround.

I hope you see the catch-22 that the two conflicting properties put VFP in. You are asking VFP to wrap text to a bordering box that keeps changing sizes. Say you want the behavior to reduce to a width that represents the width of the one widest word. With text that is long enough this can easily generate a label height that exceeds sysmetric(2) or at least exceeds form.height - lbl.top. I wouldn't exactly call that useful behavior.

There are two degenerate cases where 1) width goes to 0 and height goes infinite, and 2) where width goes infinite and height = 1 line that have to have defined handling.

There are probably a half dozen ways to define how autosize + wordwrap should work. A minimal square area might be good, but how does it decide between a 100x120 pixel area or a 120x100 pixel area? It's doubtful that everyone would agree on this point much less the whole algorithm.

Given the fact that you can write code to allow your particular requirement to be met, I'd vote that VFP simply ignore the autosize when wordwrap is turned on and just wrap to the current width to avoid the C0FD error.
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