Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>This should (I hope) be fairly simple, but I can't quite see the answer.
>
>I have a container class. It has an image and a label inside it.
>
>The label is set to Autosize = .T.
>
>When the width of the label is changed (a new caption is assigned) I would like the container to resize itself to be the width of the image + the width of the label.
>
>What event, method, etc gets the code to do this?
>
>Thanks again to all..........Rich
"I would add an assign method to the label's Caption property and put the code to resize the container there"
Thanks Marcia and Naomi......
That's what I thought but I couldn't find a way to create the method.
It's a new day so I re-read help again and finally found (don't know how I missed it before) that you can't do that in the form designer to a control on the form.
I sub-classed the label and was able to add the method there. All is OK now.
Muchly appreciated...........Rich
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement