move my cursor in a plain textbox - InfoPath Dev
in

InfoPath Dev

move my cursor in a plain textbox

Last post 12-10-2005 12:47 PM by Patrick Halstead. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 11-25-2005 07:26 AM

    move my cursor in a plain textbox

    Hi,

    I have a plain textbox and I wan't to know if it's possible to define the position of the cursor!

    for ex:
    <my:champ2>Salut tu vas <font style="BACKGROUND-COLOR: #ff6666">^</b> moi ca va?</my:champ2>

    Is it possible to highlight(like when you select him with the mouse for replace by another content) the ^ or if not move the cursor before him? with a keyboard shortcut or a button in the form?

    Thanks for your comments

    ++

    Thierry



    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 11-28-2005 03:14 PM In reply to

    Re: move my cursor in a plain textbox

    Is this a plain text box or rich text box? InfoPath programmability doesn't support moving the cursor in the field, but you could use static text and a couple expression boxes ...

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 11-28-2005 11:08 PM In reply to

    Re: move my cursor in a plain textbox

    Hi Patrick,

    Thanks for your answer!

    quote:
    Is this a plain text box or rich text box?


    For me it's equal if I can do anything with one of these I will change!

    quote:
    InfoPath programmability doesn't support moving the cursor in the field, but you could use static text and a couple expression boxes ...


    The problem is that I can't because me user need to select one (my:champ2) in a listbox and that put the text in a rtf or a pt and after the user need to replace the ^ with some other value!

    So how I can use static text it's a mixte content and it's a return of a webservice?

    ++

    Thierry




    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 11-29-2005 01:37 PM In reply to

    Re: move my cursor in a plain textbox

    I think what he was saying was that if you have a piece of the text that is the same every time, then you could put that in a static text box and then put the piece that needs to change in a regular textbox.

    How about this:

    If you know what you need to change (where your ^ needs to be) you could break the text into two textboxes. Say your return string is "I love to eat <INSERT FAVORITE FOOD HERE>" you could put "I love to eat " in one textbox and "<INSERT FAVORITE FOOD HERE>" in another textbox. Then just set focus on the second textbox and have them change their food. If you play around with borders, margins, and paddings you could even make it look to the user like it was one textbox!

    I think this is basically what Patrick was saying, hope it helps!

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-01-2005 12:55 AM In reply to

    Re: move my cursor in a plain textbox

    Hi,

    Thanks for the explanation Matt! It's a great idea!

    I understand what you mean now!

    So now questions:

    Is it possible to add some textbox and Xpath Expression Box with code or not? or modify view.xsl? Does Infopath can make some error if I try to do that?


    Thanks


    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 12-02-2005 01:41 AM In reply to

    Re: move my cursor in a plain textbox

    Hi again,
    You don't have to modify view.xsl by hand to get the beahvior that Matt describes above. Expression boxes can be added to the view with textboxes in a paragraph format. To dynamically add expression boxes on the fly will no doubt require some xdExtension stuff to dynamically set the xpath used in the view (via code). Not sure if this is nirvana for you or just a lot of sheepdip.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-02-2005 07:14 AM In reply to

    Re: move my cursor in a plain textbox

    Man, Patrick is in a silly mood today - maybe because it's friday!

    quote:
    Q: Why can't Microsoft explain things better?

    Patrick: Because they are hairless mole rats?




    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-03-2005 02:11 PM In reply to

    Re: move my cursor in a plain textbox

    Sorry about that. I think it was because it was 1:41am when I posted. Need to correct that. I've edited the post to make it slightly less silly.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-08-2005 10:51 PM In reply to

    Re: move my cursor in a plain textbox

    Ok! thanks for your explanation and thanks for the expression (hairless mole rats, sheepdip and silly mood) I understand now better english! :)

    I don't think it's a good way for me solution so I will think to another strategy!

    ++

    Thierry

    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 12-09-2005 06:48 AM In reply to

    Re: move my cursor in a plain textbox

    Hi,

    Ok I have a little bit think in my idea!

    Another way can be to emule a key press!

    Is it possible to make this with infopath?

    So I can emule the key : ->

    and so that jump to the correct place and the user can enter his text!

    I hope, I believe, I want that is possible!

    If not is there a chance that can be support in one of the new realease of Infopath (sp3 (if it's envisaged?) or in the office 12 version)?

    Thanks for your comments

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 12-10-2005 12:47 PM In reply to

    Re: move my cursor in a plain textbox

    I'd recommend WinForms for that. It's just code, and you can hook the window control and intercept it, but probably a lot of work. Sorry I don't have more time to blindly dig into this with my hairless noggin.... :)

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.