|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
richtextbox selectedtext bold upper .... how to find outWhen I select a text in a richtextbox to set de selected text in bold,
regular, italic .. or non I want to do that with one click Thus I must find out if the selected text is already in bold, regular, italic...... Is there any code for this Thanks for any response andreas wrote:
> When I select a text in a richtextbox to set de selected text in bold, if me.RichTextBox1.SelectionFont.Bold then> regular, italic .. or non I want to do that with one click > Thus I must find out if the selected text is already in bold, regular, > italic...... > Is there any code for this > Thanks for any response 'do somthing end if Thanks Ahmed, it works fine but i have still two questions
1) if I don't want bold, italic ... I set the font to regular but I lose both when they are there how set I the text to not bold only or to not italic only 2) I have taken a code from internet for making the text greater by clicking and after a little changing it works fine but the original text become Bold after wich I don't understand for what reason Here follows the code Private Sub mnuGroter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuGroter.Click Const iBasisGrootte As Single = 12 Static FontsizeVergroting As Single = 3 Dim fontsize As Single Static sGeselecteerd As String If sGeselecteerd <> rtb.SelectedText Then 'other text FontsizeVergroting = 3 End If If rtb.SelectionLength > 0 Then Dim selStart As Integer = rtb.SelectionStart Dim selLength As Integer = rtb.SelectionLength Dim currFont As System.Drawing.Font fontsize = iBasisGrootte + FontsizeVergroting Dim i As Integer For i = 0 To selLength - 1 rtb.Select(selStart + i, 1) currFont = rtb.SelectionFont rtb.SelectionFont = New Font(currFont.FontFamily, fontsize, _ currFont.Style) Next rtb.Select(selStart, selLength) FontsizeVergroting = FontsizeVergroting + 2 sGeselecteerd = rtb.SelectedText End If End Sub andreas" <andr***@pandora.be> wrote in message Show quoteHide quote news:dfIig.475527$E%2.12533817@phobos.telenet-ops.be... > When I select a text in a richtextbox to set de selected text in bold, > regular, italic .. or non I want to do that with one click > Thus I must find out if the selected text is already in bold, regular, > italic...... > Is there any code for this > Thanks for any response > >
Error converting FILETIME to DateTime
Report viewer Page margins problem ASCII Character code for the 6th power Is there a built in command to encode SQL strings? two-dimensional arrays Read text-segment from binary file Where is Page.RegisterClientScriptBlock Available? creating code on the fly at runtime How to get all files from http server elapsed between 2 dates |
|||||||||||||||||||||||