Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #218
| From | Paul Sprangers <Paul@sprie.nl> |
|---|---|
| Subject | Re: How to put a caret in a window |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2011-04-27 13:31 +0200 |
| Message-ID | <51ca78d47ePaul@sprie.nl> (permalink) |
| References | <51c98770d3Paul@sprie.nl> <3f7697c951.Matthew@sinenomine.freeserve.co.uk> <51c9a7e1b5Paul@sprie.nl> <702330ca51.Matthew@sinenomine.freeserve.co.uk> <8a105eca51.Matthew@sinenomine.freeserve.co.uk> |
| Organization | None |
Dear Matthew, Thank you very much for your comprehensive explanation. It brought me a little bit further indeed, but there's still an issue about the correct placement of the caret. What I want, is actually quite simple. I want to font_paint a short string to a small window (size of a little icon). Actually, the window should mimic an ordinary writable icon, the red caret included. The only difference is that my window should accept UTF8 input (which it does). Let me show what I have now: DEF PROCkeypress(wh%,k%) [...] Here, valid keypresses are added to the string 'string$' SYS "Font_ScanString",plain%,string$,(1<<7)+(1<<17),&3FFFFFFF,&3FFFFFFF,,,LEN(string$) TO ,,,cx%,,,,len% SYS "Wimp_SetCaretPosition",window%,-1,cx%+10,-44,40,-1 PROCredraw(window%) ENDPROC As you can see, I've set bit 7 and bit 17 in R2 of the ScanString call. I've also followed your advice to use large integers in R3 and R4. Moreover, I've also taken the length of the string in account, although I don't know what to do with it. Anyway, whatever integer or value I try, the resulting cx% is always 0. As the window can only display a single string, I don't care about the cy% value. When I set that one to -44, the caret will be displayed properly, albeit always at x=10, no matter how long the string is. Obviously, I'm still overlooking something (or many things). Can you help me further? Kind regards, Paul Sprangers
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-25 17:34 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-25 19:29 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-25 23:28 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-26 23:17 +0100
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-27 07:38 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 13:31 +0200
Re: How to put a caret in a window Jeremy Nicoll - news posts <jn.nntp.scrap007@wingsandbeaks.org.uk> - 2011-04-27 13:14 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 17:15 +0200
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-27 08:59 -0700
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 21:50 +0200
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-27 23:19 -0700
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-27 19:58 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-27 22:15 +0200
Re: How to put a caret in a window Martin Wuerthner <spamtrap@mw-software.com> - 2011-04-30 17:12 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 19:12 +0200
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-05-02 09:37 +0200
Re: How to put a caret in a window Alan Wrigley <spamhater@keepyourfilthyspamtoyourself.co.uk> - 2011-05-02 08:49 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-05-02 09:59 +0200
Re: How to put a caret in a window Alan Adams <alan@adamshome.org.uk> - 2011-05-02 21:27 +0100
Re: How to put a caret in a window Steve Fryatt <news@stevefryatt.org.uk> - 2011-05-02 09:08 +0100
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-30 12:54 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 13:52 +0200
Re: How to put a caret in a window cferris@freeRemoveuk.com.invalid - 2011-04-30 13:34 +0100
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 15:39 +0200
Re: How to put a caret in a window Matthew Phillips <mnews@sinenomine.freeserve.co.uk> - 2011-04-28 08:20 +0100
Re: How to put a caret in a window pdm <pd.miller2@tiscali.co.uk> - 2011-04-28 02:16 -0700
Re: How to put a caret in a window Paul Sprangers <Paul@sprie.nl> - 2011-04-29 17:49 +0200
Re: How to put a caret in a window Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-30 00:05 +0200
csiph-web