Author | Topic: How do I retrieve the position of the cursor within a XbpSLE object? | |
---|---|---|
Chris Carmac | How do I retrieve the position of the cursor within a XbpSLE object? on Wed, 19 Oct 2016 10:05:28 -0400 How do I retrieve the position of the cursor within a XbpSLE object? For example, if the text "1234567" is typed into a XbpSLE object and the user manually clicks the mouse inside the object and puts the cursor between the 3 and 4 (example: 123|4567), how can I retrieve the cursor position to know it is currently at position 4? I'm searched the newsgroups, and there are a lot of posts regarding how to manually set the cursor position using the :setMarked() method, but I can't find any examples of how to find out where the cursor is currently positioned. Is there a way to do this? If so, how? Thanks! Chris Carmac | |
John Sauvigne | Re: How do I retrieve the position of the cursor within a XbpSLE object? on Wed, 19 Oct 2016 13:53:55 -0400 Is there a ::Get:Pos iVar? I still use the old XBPGET.prg from Alaska and it refers to ::Get:Pos to determine and set the cursor position. HTH, John. On 10/19/2016 10:05 AM, Chris Carmac wrote: > How do I retrieve the position of the cursor within a XbpSLE object? > > For example, if the text "1234567" is typed into a XbpSLE object and the > user manually clicks the mouse inside the object and puts the cursor > between the 3 and 4 (example: 123|4567), how can I retrieve the cursor > position to know it is currently at position 4? > > I'm searched the newsgroups, and there are a lot of posts regarding how > to manually set the cursor position using the :setMarked() method, but I > can't find any examples of how to find out where the cursor is currently > positioned. > > Is there a way to do this? If so, how? > > Thanks! > > Chris Carmac | |
Andreas Gehrs-Pahl | Re: How do I retrieve the position of the cursor within a XbpSLE object? on Wed, 19 Oct 2016 13:55:31 -0400 Chris, >How do I retrieve the position of the cursor within a XbpSLE object? oSLE:QueryMarked() -> aMarked >For example, if the text "1234567" is typed into a XbpSLE object and the >user manually clicks the mouse inside the object and puts the cursor >between the 3 and 4 (example: 123|4567), how can I retrieve the cursor >position to know it is currently at position 4? If the cursor is between the "3" and the "4", :QueryMarked() would return: {4, 4} and if the "4" is highlighted, :QueryMarked() would return: {4, 5}. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC | |
Chris Carmac | Re: How do I retrieve the position of the cursor within a XbpSLE object? on Wed, 19 Oct 2016 17:12:17 -0400 On 10/19/2016 10:05 AM, Chris Carmac wrote: > How do I retrieve the position of the cursor within a XbpSLE object? > > For example, if the text "1234567" is typed into a XbpSLE object and the > user manually clicks the mouse inside the object and puts the cursor > between the 3 and 4 (example: 123|4567), how can I retrieve the cursor > position to know it is currently at position 4? > > I'm searched the newsgroups, and there are a lot of posts regarding how > to manually set the cursor position using the :setMarked() method, but I > can't find any examples of how to find out where the cursor is currently > positioned. > > Is there a way to do this? If so, how? > > Thanks! > > Chris Carmac John and Andreas, Thanks for your quick responses! I tested the :queryMarked() method that Andreas suggested, and it looks like that will work for what I need. I appreciate the help! Chris | |
Carlos a Beling | Re: How do I retrieve the position of the cursor within a XbpSLE object? on Sat, 29 Oct 2016 13:32:59 -0200 Good afternoon. I am having a strange behavior of XbpGet() when I move the right and left arrows in the first time that I start a Get() edition. I will investigate it soon. Does someone has this problem too? Fraternally Beling Em 19/10/2016 19:12, Chris Carmac escreveu: > On 10/19/2016 10:05 AM, Chris Carmac wrote: >> How do I retrieve the position of the cursor within a XbpSLE object? >> >> For example, if the text "1234567" is typed into a XbpSLE object and the >> user manually clicks the mouse inside the object and puts the cursor >> between the 3 and 4 (example: 123|4567), how can I retrieve the cursor >> position to know it is currently at position 4? >> >> I'm searched the newsgroups, and there are a lot of posts regarding how >> to manually set the cursor position using the :setMarked() method, but I >> can't find any examples of how to find out where the cursor is currently >> positioned. >> >> Is there a way to do this? If so, how? >> >> Thanks! >> >> Chris Carmac > > > John and Andreas, > > Thanks for your quick responses! I tested the :queryMarked() method > that Andreas suggested, and it looks like that will work for what I need. > > I appreciate the help! > > Chris |