Hi Ken,

On 5/23/05 12:02 PM, "Klaus Major" <[EMAIL PROTECTED]> wrote:

...
This is only possible, if at all, on ONE platform*** only ONE
(static) label and with lots of testing...
*** The slight font differences!

Ah ha! OK, Klaus, I think I've hit on the magic equation... test it and see
if it works for you:

on mouseUp
  CenterIt (long id of btn 2),4
end mouseUp

on CenterIt pBtnID,pMargin
  put the height of pBtnID into tHt
  put the textHeight of pBtnID into tTxHt
  put the icon of pBtnID into tIconID
  put the formattedHeight of img id tIconID into tFmtHt
  put round((tHt - tTxHt)/2) into tBotMargin
  put tBotMargin + tFmtHt into tTopMargin
  set the margins of pBtnID to
pMargin,tTopMargin-pMargin,pMargin,tBotMargin+pMargin
end CenterIt


The only "hard part" here is that you need to factor in the formattedHeight of the icon's image - and if you don't know where it is, you can't get it's formattedHeight. For the purposes of the code above, it is assumed that the
icon is on the same card (hidden), but you can adapt to suit.

Jeanne had the right suggestion - be able to get the "long name" or "long
id" of an image used as an icon so you can know where it is located.
Consider voting for Bug 521
(http://support.runrev.com/bugdatabase/show_bug.cgi?id=521).

Let me know how it works for you,

sorry, it doesn't
Half the text appears on top of the icon...

But the script looks quite impressive ;-)

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]

Regards

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to