Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

Help with inlineshpae textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 18 Oct 2007 17:07 GMT
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
Jean-Guy Marcil - 19 Oct 2007 20:01 GMT
Jim was telling us:
Jim nous racontait que :

> hello,
>
[quoted text clipped - 14 lines]
> 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?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Dave D-C - 20 Oct 2007 16:46 GMT
>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,
[quoted text clipped - 21 lines]
>What event you need the single click to perform? There may be another way to
>achieve the same results?
Jim - 21 Oct 2007 17:26 GMT
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

>>There may be another way to achieve the same results?
> If you want multiple options, I suggest a  right-click popup menu.
[quoted text clipped - 30 lines]
> World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -
> Total Privacy via Encryption =----
Russ - 21 Oct 2007 21:52 GMT
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 -
>
[quoted text clipped - 81 lines]
>> World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -
>> Total Privacy via Encryption =----

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Jim - 22 Oct 2007 03:11 GMT
Thanks, I'll check it out

Jim

> Dave,
> What you describe may be a good application of AutoTextLists:
[quoted text clipped - 87 lines]
>>> World! 120,000+ Newsgroups ----= East and West-Coast Server Farms -
>>> Total Privacy via Encryption =----
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.