> Rev: > ----- > put the effective textFont of the selection into tFont > if tFont <> the label of me then > select line (lineOffset(cr& tFont &cr,cr&btn "FontMenu"&cr)) of > btn "FontMenu" > end if > > or, if you like a one-liner: > > select line (lineOffset(cr&(the effective textFont of the selection) > &cr,cr&btn "FontMenu"&cr)) of btn "FontMenu"
You could also subclass, or extend the syntax of realBasic and have code which is RealBasic - one line ------------------------ fontMenuButton.font = Me.SelTextFont with the font method you then test if the new value equals the old value and then take the action you want. Which code is easier to read/understand? If I want a font menu on a window I just drop a popup menu on the window and set it's subclass to kjtlPopupMenuFont. That's it. Ignorance is a dangerous thing ... Keith Hutchison Balance-Infosystems.Com postgresql - mysql - dbf Foxpro - Delphi - MS Access - REALbasic - Java http://balance-infosystems.com http://realopen.org _______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
