trichview.support
Re: How can i check the last line text? |
Author |
Message |
Sergey Tkachenko |
Posted: 10/02/2003 22:11:49 If you want to check the last item: (RichViewEdit1.GetItemText(RichViewEdit1.ItemCount -1) = '') and (RichViewEdit1.GetItemStyle(RichViewEdit1.ItemCount -1) >= 0); If you want to check the last paragraph, check: (RichViewEdit1.GetItemText(RichViewEdit1.ItemCount -1) = '') and (RichViewEdit1.GetItemStyle(RichViewEdit1.ItemCount -1) >= 0) and RichViewEdit1.IsParaStart(RichViewEdit1.ItemCount -1); // this expression is false if the last paragraph has a list marker ( LineCount is obsolete property. It is the same as ItemCount. Items are not necessary lines. ) > I wanna know if the last line is empty... > > with this code works fine > if RichViewEdit1.GetItemText(RichViewEdit1.LineCount -1) = '' then > > but if i have a picture on the last line, this code also returns a empty > string. Is there another option to check if the last line is completely > empty? and if is empty, how can i delete it? > > thanks > > |
Powered by ABC Amber Outlook Express Converter