Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #419

Re: Embedding a lable inside a Rich Text Box

From Michael Cole <invalid@microsoft.com>
Newsgroups alt.comp.lang.vb, microsoft.public.vb.general.discussion, alt.comp.lang.visualbasic, comp.lang.basic.visual.misc
Subject Re: Embedding a lable inside a Rich Text Box
Date 2011-09-01 10:42 +1000
Organization A noiseless patient Spider
Message-ID <j3mkat$qpk$1@dont-email.me> (permalink)
References <j34saf$uss$1@dont-email.me> <j361e4$54m$1@dont-email.me> <j36poq$38v$1@dont-email.me> <j37ihc$og7$1@dont-email.me> <j389qm$6pt$1@dont-email.me>

Cross-posted to 4 groups.

Show all headers | View raw


Mayayana wrote on 27/08/2011 :
>   You've probably already considered this, but I wonder
> about just processing actions as they happen. There
> are options like EM_FINDWORDBREAK to find the beginning
> and end of the "word" you're in at click. From there it
> shouldn't be hard to test for a valid email address and
> then select the text, etc. The operations are simple
> enough that they should be feasible to do instantly at
> every click. (Instant in human terms, at any rate.)

This is what I have eventually ended up doing.  Even still, it leaves 
some issues, but it works.  You also find out that the RTB is buggy.

One of many such interesting issues: -
  Create a form, and add a RichTextBox to it.

Put this code in: -

   RichTextBox.TextRTF = "A" & Chr$(160) & "B"  'Non-breaking space
   Debug.Print Asc(Mid(RichTextBox.Text, 2, 1))
   RichTextBox.TextRTF = RichTextBox.TextRTF
   Debug.Print Asc(Mid(RichTextBox.Text, 2, 1))

Have a guess what the two debug statements print out...

Fun, fun, fun...

-- 
Michael Cole

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-25 17:07 +1000
  Re: Embedding a lable inside a Rich Text Box "MikeD" <nobody@nowhere.edu> - 2011-08-25 13:40 -0400
    Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-26 10:36 +1000
      Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-26 17:39 +1000
        Re: Embedding a lable inside a Rich Text Box "mbyerley" <mbyerley@byerley.net> - 2011-08-26 07:46 -0400
        Re: Embedding a lable inside a Rich Text Box "Mayayana" <mayayana@invalid.nospam> - 2011-08-26 10:18 -0400
          Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-09-01 10:42 +1000
            Re: Embedding a lable inside a Rich Text Box "Mayayana" <mayayana@invalid.nospam> - 2011-08-31 22:18 -0400
              Re: Embedding a lable inside a Rich Text Box "Jim Mack" <no-uce-ube@mdxi.com> - 2011-09-01 08:36 -0400
              Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-09-02 10:22 +1000
        Re: Embedding a lable inside a Rich Text Box Raoul Watson <WatsonR@IntelligenCIA.com> - 2011-09-11 12:00 -0400

csiph-web