thanks RP, that works great. i also wondered why I could not get the MarkDocAsDirty to work too. ~ steve On Dec 4, 2004, at 4:03 AM, Robert Purves wrote: > > Steve Crossman wrote: > >> Back to our regularly scheduled programming. >> Can anyone help me determine font information from selected text or >> point me in the right direction? >>> can someone point me to some examples on the latest FB^4 CD that >>> shows how to obtain font information from selected text in an edit >>> field ? i want to update the font panel with the selected text. > > TEGetStyle is your friend. > > > dim as TextStyle style > dim as short @ lineHeight, fontAscent > dim teH as ^^TERec > > // set up window and edit field 1 > ... > // > > teH = TEHandle( 1 ) > long if ( teH ) > // Get style info for the character at the start of the selection. > // In a multi-styled field, subsequent characters may have different > styles. > TEGetStyle( teH..selStart, @style, @lineHeight, @fontAscent, teH ) > print "font " style.tsFont > print "style " style.tsFace > print "size " style.tsSize > end if > > > Robert P. > > -- >