J
JonWayn
For quite a while now I have been struggling with a custom messagebox
function and I think its time I seek help on the matter. Hope someone here
has done something similar before.
I have a custom messagebox in a database which is made up of a form, a label
control, and 2 command buttons. The reason I am using this messagebox instead
of VB's MessageBox function is that depending on the urgency of the message,
I want the label to have 1 of 4 background color. The problem comes in when
the message doesnt fit the lable dimensions - when it requires the label to
be wider, taller or both - (there is never the need to make it smaller. It is
left as is if there is more than required room). The crux of the matter is
that if the string passed in is wider than the original label width will
take, I want line breaks inserted in the input string so that the message
will wrap lines until it fits. With the original size of the label, 5 or 6
line-wraps can be acommodated. If the whole string fits within those
parameters, then return the new line-wrapped string. If it doesnt, make
width/height adjustments upto, but not exceeding a predefined width. I am the
only caller of the function so I ensure that the message is constrained to
typical dimensions. Hope that isnt too confusing
function and I think its time I seek help on the matter. Hope someone here
has done something similar before.
I have a custom messagebox in a database which is made up of a form, a label
control, and 2 command buttons. The reason I am using this messagebox instead
of VB's MessageBox function is that depending on the urgency of the message,
I want the label to have 1 of 4 background color. The problem comes in when
the message doesnt fit the lable dimensions - when it requires the label to
be wider, taller or both - (there is never the need to make it smaller. It is
left as is if there is more than required room). The crux of the matter is
that if the string passed in is wider than the original label width will
take, I want line breaks inserted in the input string so that the message
will wrap lines until it fits. With the original size of the label, 5 or 6
line-wraps can be acommodated. If the whole string fits within those
parameters, then return the new line-wrapped string. If it doesnt, make
width/height adjustments upto, but not exceeding a predefined width. I am the
only caller of the function so I ensure that the message is constrained to
typical dimensions. Hope that isnt too confusing