Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 13 SEP 2006 10:22:37PM David E Schranz wrote:

I'm trying to provide some editing features in certain edit boxes I have in my application, such as search/replace, showing row and column currently on, etc. Before I proceed with re-inventing the wheel, can anyone please direct/tell me if:

1. there is already any feature (e.g. subroutine, function, OCX, etc) that handles my type of request

2. failing (1) above, what is the best way to only allow a to got to the next window object while forcing an to act as ?

3. what is the best way to identify the current row and column on which the cursor is positioned in an edit box?

Thanks


At 14 SEP 2006 02:40PM [url=http://www.srpcs.com]SRP[/url]'s Kevin Fournier wrote:

David,

As far as I can tell, the default behavior of an edit box is to insert new lines when pressing . Is this what you wanted? Or are you wanting to act like ?

As for the line and column, you can do this using BASIC+ code. First, add the following equates to your code:

Equ [/color]EM_LINEINDEX$       [/color]to  [/color]0x00BB 
[/color]Equ [/color]EM_LINEFROMCHAR$    [/color]to  [/color]0x00C9[/color][/color][/size]         
               

Next, you need to use the edit box's handle and the SendMessage call to get the information you desire.

    // get the handle 
    [/color]hEditBox=Get_Property([/color]@Window[/color]:[/color]".EDITBOX"[/color], [/color]"HANDLE"[/color]) 
     
    [/color]// get the line number 
    [/color]Line=SendMessage(hEditBox, EM_LINEFROMCHAR$, -[/color]1[/color], [/color]0[/color]) + [/color]1 
     
    [/color]// calculate the column position 
    [/color]Selection=Get_Property([/color]@Window[/color]:[/color]".EDITBOX"[/color], [/color]"SELECTION"[/color]) 
    Col=Selection1[/color]] - (SendMessage(hEditBox, EM_LINEINDEX$, -[/color]1[/color], [/color]0[/color]) + [/color]1[/color])[/color][/color][/size]         
               

kfournier@srpcs.com

SRP Computer Solutions, Inc.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/7f8b5d328fa64e14852571e9000d0e97.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1