Help with inlineshpae textbox

J

Jim

hello,

I have a form with a number of textboxes embedded as inlineshapes, each of
which have a dblclick event assigned to them - this works just fine. I
would very much like to have a seperate click event to do something else,
but a textbox (as an inline shape) does not have a click event. I tried
using a mousedown event, but this activated before I could double click it.

Embedded labels do have both click and doubleclick events, and these work
but are not what I need for this application.


here is what the double click does: , the single click would have to start
a different subroutine.


Private Sub TBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TBox1.Text = ChangeTextBoxText(GetILS, TBox1.SelStart, TBox1.Text)
End Sub


Thanks Jim
 
J

Jean-Guy Marcil

Jim was telling us:
Jim nous racontait que :
hello,

I have a form with a number of textboxes embedded as inlineshapes,
each of which have a dblclick event assigned to them - this works
just fine. I would very much like to have a seperate click event to
do something else, but a textbox (as an inline shape) does not have a
click event. I tried using a mousedown event, but this activated
before I could double click it.

Embedded labels do have both click and doubleclick events, and these
work but are not what I need for this application.


here is what the double click does: , the single click would have to
start a different subroutine.


Private Sub TBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TBox1.Text = ChangeTextBoxText(GetILS, TBox1.SelStart, TBox1.Text)
End Sub

Labels do have both events, but you could not use both. If you try to use
both, as soon as a click is detected, the click event is triggered and even
if that click is the first of a double click event. If you use both, as soon
as you double click, both events are triggered. In any case, this is what I
observed just now with Word 2003. I have never worked with events and labels
before as I have always used them as just that... plain inert labels!

What event you need the single click to perform? There may be another way to
achieve the same results?

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
D

Dave D-C

There may be another way to achieve the same results?
If you want multiple options, I suggest a right-click popup menu.
 
J

Jim

Thank you for responding -

I see what you mean about having both the double click and click events
being mutually exclusive. I don't need both in the labels, just noticed
that it has both capabilities.

What I am trying to do is make a word document with textboxes for
entering physical exam results. This ideally would contain a normal
exam as the first option, then various subsets of the exam within esch
category, both with normal and abnornal findings. The way I have set
this up is to embed the phrases in < and > marks ( I call them chevrons,
but it is probably not the right term).


one line is like this:

Lungs: <clear with good air movement><clear, ><good air movement, >
<decreased breath sounds, ><no wheeze, ><no crackles, ><no rhonchii, >
<no rub, >

The user would click on a place in the textbox and my vba code then
determines if the textbox.selstart is in text which is embedded between
2 chevrons. The reason I would like a click and double click event (
or something else) is that I would like just one click to clear the
chevrons, which converts the test to "straight" text. All of the
reamining chevron embedded text is delected prior to saving/printing the
forrm , this leaves only what I want to keep.

The second action would cause a dropdown to open right over the selected
text phrase, containing varaition on the selected phrase - things like
"scattered wheeze, " or "very diminished breath sound on right, "
which the user could then pick.

I didn't want a dropdown every time a text is clicked, as most of the
time, the correct embedded text will be ok as it is, and only needs to
be marked to keep when the extra is removed later.

I tried a right click, but it doesn't do anything in a textbox on a word
document as an inlineshape.


I will try to work on a submenu that opens with a rightclick in a
textbox, but If I can't, then maybe I'll use 2 types of embedding, <>'s
and [] marks, converting to the [] after the first click, and opening up
a dropdown if text embedded in [] is then clicked. Then making [] text
into clear text before the final save/print.


Again thanks for your help.
PS - some pointers on how to get a dropdown box to open right below
selected spot in a text box would be most appreciated.

Jim
 
R

Russ

Dave,
What you describe may be a good application of AutoTextLists:
http://word.mvps.org/faqs/tblsfldsfms/AutoTextList.htm
And you may be able to do without the 'chevrons'.
Thank you for responding -

I see what you mean about having both the double click and click events
being mutually exclusive. I don't need both in the labels, just noticed
that it has both capabilities.

What I am trying to do is make a word document with textboxes for
entering physical exam results. This ideally would contain a normal
exam as the first option, then various subsets of the exam within esch
category, both with normal and abnornal findings. The way I have set
this up is to embed the phrases in < and > marks ( I call them chevrons,
but it is probably not the right term).


one line is like this:

Lungs: <clear with good air movement><clear, ><good air movement, >
<decreased breath sounds, ><no wheeze, ><no crackles, ><no rhonchii, >
<no rub, >

The user would click on a place in the textbox and my vba code then
determines if the textbox.selstart is in text which is embedded between
2 chevrons. The reason I would like a click and double click event (
or something else) is that I would like just one click to clear the
chevrons, which converts the test to "straight" text. All of the
reamining chevron embedded text is delected prior to saving/printing the
forrm , this leaves only what I want to keep.

The second action would cause a dropdown to open right over the selected
text phrase, containing varaition on the selected phrase - things like
"scattered wheeze, " or "very diminished breath sound on right, "
which the user could then pick.

I didn't want a dropdown every time a text is clicked, as most of the
time, the correct embedded text will be ok as it is, and only needs to
be marked to keep when the extra is removed later.

I tried a right click, but it doesn't do anything in a textbox on a word
document as an inlineshape.


I will try to work on a submenu that opens with a rightclick in a
textbox, but If I can't, then maybe I'll use 2 types of embedding, <>'s
and [] marks, converting to the [] after the first click, and opening up
a dropdown if text embedded in [] is then clicked. Then making [] text
into clear text before the final save/print.


Again thanks for your help.
PS - some pointers on how to get a dropdown box to open right below
selected spot in a text box would be most appreciated.

Jim


If you want multiple options, I suggest a right-click popup menu.




----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the
World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -
Total Privacy via Encryption =----
 
J

Jim

Thanks, I'll check it out

Jim

Dave,
What you describe may be a good application of AutoTextLists:
http://word.mvps.org/faqs/tblsfldsfms/AutoTextList.htm
And you may be able to do without the 'chevrons'.
Thank you for responding -

I see what you mean about having both the double click and click events
being mutually exclusive. I don't need both in the labels, just noticed
that it has both capabilities.

What I am trying to do is make a word document with textboxes for
entering physical exam results. This ideally would contain a normal
exam as the first option, then various subsets of the exam within esch
category, both with normal and abnornal findings. The way I have set
this up is to embed the phrases in < and > marks ( I call them chevrons,
but it is probably not the right term).


one line is like this:

Lungs: <clear with good air movement><clear, ><good air movement, >
<decreased breath sounds, ><no wheeze, ><no crackles, ><no rhonchii,
<no rub, >

The user would click on a place in the textbox and my vba code then
determines if the textbox.selstart is in text which is embedded between
2 chevrons. The reason I would like a click and double click event (
or something else) is that I would like just one click to clear the
chevrons, which converts the test to "straight" text. All of the
reamining chevron embedded text is delected prior to saving/printing the
forrm , this leaves only what I want to keep.

The second action would cause a dropdown to open right over the selected
text phrase, containing varaition on the selected phrase - things like
"scattered wheeze, " or "very diminished breath sound on right, "
which the user could then pick.

I didn't want a dropdown every time a text is clicked, as most of the
time, the correct embedded text will be ok as it is, and only needs to
be marked to keep when the extra is removed later.

I tried a right click, but it doesn't do anything in a textbox on a word
document as an inlineshape.


I will try to work on a submenu that opens with a rightclick in a
textbox, but If I can't, then maybe I'll use 2 types of embedding,
and [] marks, converting to the [] after the first click, and opening up
a dropdown if text embedded in [] is then clicked. Then making [] text
into clear text before the final save/print.


Again thanks for your help.
PS - some pointers on how to get a dropdown box to open right below
selected spot in a text box would be most appreciated.

Jim


There may be another way to achieve the same results?
If you want multiple options, I suggest a right-click popup menu.

:
Jim was telling us:
hello,
I have a form with a number of textboxes embedded as inlineshapes,
each of which have a dblclick event assigned to them - this works
just fine. I would very much like to have a seperate click event to
do something else, but a textbox (as an inline shape) does not have
a click event. I tried using a mousedown event, but this activated
before I could double click it.
Embedded labels do have both click and doubleclick events, and these
work but are not what I need for this application.
here is what the double click does: , the single click would have to
start a different subroutine.
Private Sub TBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
TBox1.Text = ChangeTextBoxText(GetILS, TBox1.SelStart, TBox1.Text)
End Sub

Labels do have both events, but you could not use both. If you try to
use both, as soon as a click is detected, the click event is triggered
and even if that click is the first of a double click event. If you
use both, as soon as you double click, both events are triggered. In
any case, this is what I observed just now with Word 2003. I have
never worked with events and labels before as I have always used them
as just that... plain inert labels!

What event you need the single click to perform? There may be another
way to achieve the same results?


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet
News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the
World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -
Total Privacy via Encryption =----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top