OT: Analyzing competitors - In this case Real Software
Keith Hutchison
keith.hutchison at balance-infosystems.com
Tue Mar 22 17:06:52 EST 2005
> 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
More information about the use-livecode
mailing list