Label missing after dynamic width change

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

I have a label that spans a group of combo boxes in a matrix layout.
Based on certain conditions, the combo boxes in the last column(s) are
hidden. I set the width of the label dynamically to center over the
combo boxes that are showing.

Now that I have set the width dynamically, the label never shows at
all. I have not touched the visible setting of the label or anything
else about it, only the width was changed. When I trace the code, I
can't see anything that helps me know what is happening. I even set the
Visible property to True in code as a test. That did not help either.

Any ideas?
 
JB said:
I have a label that spans a group of combo boxes in a matrix layout.
Based on certain conditions, the combo boxes in the last column(s) are
hidden. I set the width of the label dynamically to center over the
combo boxes that are showing.

Now that I have set the width dynamically, the label never shows at
all. I have not touched the visible setting of the label or anything
else about it, only the width was changed. When I trace the code, I
can't see anything that helps me know what is happening. I even set the
Visible property to True in code as a test. That did not help either.


The only ideas that come to mind is that an attached label
becomes invisible when its parent control is made invisible.
OTOH, maybe you're setting the width to a very small number.
Remember that the position properties are in units of twips
(1440 per inch).
 
I figured it out. I had set the property to inches and used quotes.
That made it disppear. Once I calculated number of inches * 1440 and
did not use quotes, it came back. Thanks for the reply.
 
Back
Top