center a label in a form

G

Guest

Hi all,

I have done a code that allows to center a label in a form because it seems
there is no property to do this directly.

Set oInspector = Item.GetInspector
Set oPage1 = oInspector.ModifiedFormPages("Fiche de non conformité")
Set oTitle = oPage1.Controls("txtTitle")
oTitle.Left = (oPage1.InsideWidth - oTitre.Width)/2

I have test my code thanks to a button to execute it, it works, but I don't
know with which event I have to link it to center the label directly when
the form is opened and to allow the label to remain centered when the form
is resized.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top