New topic: CharPosAtXY not working?
<http://forums.realsoftware.com/viewtopic.php?t=32221> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message Indy Post subject: CharPosAtXY not working?Posted: Wed Jan 27, 2010 11:13 pm Joined: Wed Jul 09, 2008 10:46 pm Posts: 120 Location: Minneapolis Windows, RB 09r5.1 I tried using CharPosAtXY for the first time and I can't get it to work. I added a text field and added the following code: Open Code:tftest.Text = "1234567890" MouseDown Code:dim p as integer p = me.CharPosAtXY(x, y) wMain.logw.AppendText "x, y, p = "+str(x)+", "+str(y)+", "+str(p)+EndOfLine Here's the output: x, y, p = 44, 5, 0 x, y, p = 15, 10, 0 x, y, p = 44, 13, 0 x, y, p = 75, 4, 0 x, y, p = 39, 11, 0 x, y, p = 10, 11, 0 x, y, p = 18, 13, 0 x, y, p = 71, 13, 0 Any ideas why CharPosAtXY is always returning zero? Thanks, _________________ http://www.miscjunk.org Top jefftullin Post subject: Re: CharPosAtXY not working?Posted: Thu Jan 28, 2010 2:23 am Joined: Wed Nov 15, 2006 3:50 pm Posts: 1255 total guess: unicode strings? try chr(p) instead of str(p) Top timhare Post subject: Re: CharPosAtXY not working?Posted: Thu Jan 28, 2010 3:16 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 7177 Location: Portland, OR USA @jeff: huh??? Your code works in older versions. It does look like something is broken. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
