Hi all, REALbasic 2006 Release 4 Mac OS X 10.4.8
I was wanted to get some informations from an EditField (typically the used text font) and fall into a trap. >From the Language Reference: EditField.TextFont: <quote> Name of the font used to display the text. </quote> Quite ambiguous. [1] I was believing that this is the EditField default TextFont. EditField.SelTextFont: <quote> Used to get and set the text font of the highlighted text. </quote> That is was I was expecting and the subject of my troubles (with .TextFont). What ? And when no highlighted text ? [2] in other words: "What happens when i want to get the TextFont when i move the cursor without any selected text ?" In reality: [1] is the default font for the text used by the EditField when no text font have been set; usually, when the EditField opens, the text (when some is there or the added text) the TextFont used to display the text until a different one is used. [2] when no text is highlighted is the information I wanted. After - too much time - some researches, it appears - on MacOS X - that this is the information I wanted! At a glance: When you want to know the TextFont of any particular text and even if there is no _selected text_, check .SelTextFont and you will get the used TextFont at the cursor position. No, this is not "the salt of the programmer's life". This is simply wasting precious time of every programmer who follow that way (and do not have read or understand this mail). Ah, it is midnight, largely time to sleep. Cheers, Emile Now, I can report in a StaticText (status) line the TextFont, TextSize, etc. at the cursor position! And you know what ? I'm happy! (à la Droopy) -- The mocker: "Do you know what is the difference between Theory and Practice ?" The naive: "No!" The mocker: "In theory, this is the same; in practice, ..." _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
