Hi all,

I am calling CtlSetLabel() to set the text of a popup trigger.

It would appear that calling this function on a popup trigger resets the
bounds of the trigger object.  What is troubling about this is that the
trigger object can then be resized to a width greater than what was
originally set in the resource for the trigger.  This means that my nicely
layed out dialog can become garbage as my trigger's width runs over other
control areas.

In the documentation for 'ControlType', the description for the 'bounds'
member is that the control's text label is clipped to the control's bounds.
This would not seem to hold true for popup triggers.  I would expect the
trigger control to use the 'bounds' member as a maximum width possible, but
it doesn't seem to, it seems to resize whenever its label is set.  I
understand that to a certain degree given the resizing behavior of the
control.

Now, I know there is the 'Anchor Left' setting in Constructor which can help
a little, but not completely.  My popup trigger is along the left edge of
the form, so if I choose to NOT anchor left, then it runs off the left side,
and no trigger arrow is visibl--not good!

I know there is the CategorySetTriggerLabel() function which seems to let
the trigger grow only so wide, and then truncates the text and adds "..." to
it.

Soooo...has anyone found a way to control this control, so to speak?  Is
there a way to specify the maximum width of a popup trigger?  The only
alternative I see is storing what the maximum pixel width of the trigger can
be, and then calling a function that determines how many characters of my
string will fit within that width, and then use that truncated string in my
call to 'CtlSetLabel().'

Any/all help greatly appreciated!

Thanks,

-Ken







-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to