Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

editing an rtf memo in an xdialog

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    editing an rtf memo in an xdialog

    has anyone ever attempted this
    I know many use xdialog for editing regular memos, but so far I have been unsuccessful in creating an xdialog with an rtf memo field that opens with the text from a current rtf memo field
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    [email protected]

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

    #2
    Re: editing an rtf memo in an xdialog

    Never attempted as an xdialog but was trying to do something similar with rtf memo and did not like the result, so I switched to an HTML memo field and then used the code similar (not identical) to that shown below, which opens an A5 html editor (same as clicking the pencil icon if displayed on a form) with the value of the current html memo field (though this is not what I do for my purposes).

    What I was doing was rolling my own email Send form for a special purpose and by the user clicking a button (not the pencil icon, which on my read only field is not even displayed) wanted the user to be able to have a canned message with a bitmap logo that could be added to, edited, spell checked and for which I could pre-define the font, font size, font color,etc. Then I use email_smtp_open() and email_smtp_send() to send the message, using neither the A5 email client nor the Windows default. In my case the current HTML memo field is always empty and I never write anything to it. I just use a dummy field in a small, almost dummy table to display the initial and the edited message before sending it, and I use code in the form's OnActivate event to display (not save) the initial canned message the user can edit, if they choose to. In my case, none of the sent messages are ever saved, though of course they easily could be.

    The code below, of course, is not an xdialog, but maybe it will be helpful for what you are trying to do, and maybe it could be incorporated in an xdialog?

    Raymond Lyons

    Code:
    dim t as p
    dim html_code as c
    t = table.current()
    html_code = t.email_ed    'get the the current text (html code)
    p = a5_html_modal(html_code,"Ray's special Email Message Editor",.t.)
    
    If p.lastbutton = "OK"    'i.e., Save
        t.change_begin()
        t.email_ed = p.text    'the edited message
        t.change_end()
        parentform:email_ed.Refresh()    'if displaying on form
    'DON'T NEED for my purposes: else if p.lastbutton = "Cancel"
    '    msgbox("Lastbutton","Cancel")
    end if
    
    'p returns two properties
    'p.lastbutton  - ok or cancel
    'p.text - the text the user edited, which you can then write the data back to the table if you want.

    Comment


      #3
      Re: editing an rtf memo in an xdialog

      thanks Ray
      I experimented with HTML memos, but opted not to use them over rtf memos - the reason being that my users want to copy and paste from word to the memo field - and after extensive testing realize that while neither work for everything, the rft does a much much better job than the html

      when you paste something from word, that has say numbering and bullets and font colors, etc., when you first paste to html, it looks great - but if you scrtinize closely you will notice that case is last after a font color change, commas are sometimes replaced with periods - and when you preview on a report the numbering and bullets will display horribly

      BUT if the user never does copy and paste they are great. But people are so darn spoiled these days, and want to copy and paste from different places to different places - and a lot of software lets them.

      If I get no response, I'll just continue to let them work in the editor.
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


        #4
        Re: editing an rtf memo in an xdialog

        Martin,

        Could it just be a problem when using Word? Because I just did a bunch of testing using my scheme with text copied and pasted from the Open Office word processor. When I test previewed it in a report, everything came out just as you would expect--at least as near as I can tell. I used color changes, size changes, bold, italics, lots of commas and periods and at least 6 bullets with various changes in them.

        I don't even have Word loaded on my computer anymore (don't like it), so I can't test with it.

        Ray

        Comment


          #5
          Re: editing an rtf memo in an xdialog

          Yes, most likely its word - but - the client uses word - and they ain't going to convert to open office - so in this single case - its a moot point - but I really appreciste that you told me about open office, though - options for the future!!!
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            Re: editing an rtf memo in an xdialog

            Martin,
            Imagine a table called license with one field "Text_string" that is Rich Text Memo and you want to display the text from record 1 in an XDialog.
            Below is code that I hope helps.


            Code:
            DIM SHARED result as C
            ok_button_label = "&OK"
            
            dim crtf.object as P
            dim crtf.text as C
            
            tbl = table.open("license") 
            tbl.fetch_goto(1) 
            license_stringA = tbl.Text_string 
            tbl.close()
            
            crtf.object = rtf.create(license_stringA)
            crtf.text   = crtf.object.rtf_text
            
            result = ui_dlg_box("XXXXXXXX License agreement",<<%dlg%
            {on_key=Enter}
            {frame=1,1}
            {region}
            {rtf=%wr%100,40crtf};
            {on_activate=dlg_arrive}
            {endregion};
            {line=1,0};
            {region}
            <*OK>
            {endregion};
            %dlg%,<<%code% 
            1=1
            if a_dlg_button="dlg_arrive" then 
            a_dlg_button = ""
            sys_send_keys("{home}")
            end if
            end
            %code%)
            Last edited by Garry Flanigan; 09-04-2010, 09:48 PM.

            Comment


              #7
              Re: editing an rtf memo in an xdialog

              A "blank" rtf record is silently, automatically created when a user enters a new parent record. (The memos are kept in a separate 1-to-1 table, and there is never more than one memo per parent record.)

              My goal is to provide an xdialog for editing, where they would add to or modify the memo, and then save it back to the memo. This is a technique commonly used for editing regular memos.

              Thanks. I will play with this and see if I can modify it for that use. I'll have to have a way to display the rtf tools.
              Cole Custom Programming - Terrell, Texas
              972 524 8714
              [email protected]

              ____________________
              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

              Comment


                #8
                Re: editing an rtf memo in an xdialog

                Martin,
                If you want to edit text in example I provided then change:

                {rtf=%wr%100,40crtf};

                to

                {rtf=%w%100,40crtf};

                You will of course need to make other changes to save the record, navigate, etc..

                Comment


                  #9
                  Re: editing an rtf memo in an xdialog

                  thanks - will play with
                  Cole Custom Programming - Terrell, Texas
                  972 524 8714
                  [email protected]

                  ____________________
                  "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                  Comment

                  Working...
                  X