{{tag>category:"OpenInsight 32-bit Specific"}} [[https://www.revelation.com/|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]] ==== Editbox differences (OpenInsight 32-bit Specific) ==== === At 27 JUN 2002 01:42:31AM Paul Rule wrote: === In 16 bit OI I had been using statements like val=set_property(@window:".EB_EDITBOX","SELECTION",50:@vm:10) to highlight certain text in edit boxes. If the text was outside of the viewable area in the edit box then it would automatically scroll to make the highlighted text visable. This is no longer the case in OI 32. Is this a bug or does anyone know of a workaround? ---- === At 27 JUN 2002 04:38AM Oystein Reigem wrote: === Paul, It's worse. I can't get Set_Property SELECTION to work at all. The SELECTION is always set to 1:@fm:0, i.e, no selection. No wonder the edit box doesn't scroll. I've tried both edit boxes and edit lines. (Btw - you wrote @vm but it should be @fm.) - Oystein - ---- === At 27 JUN 2002 06:41PM Paul Rule wrote: === Hmm, thats not what I wanted to hear. Sounds like one for the guys at Revelation! You're right about the @fm. I mistyped it in the posting. You made me go back and check my code though. It was ok. Cheers Paul ---- === At 28 JUN 2002 04:06AM Oystein Reigem wrote: === Paul, [i]Hmm, thats not what I wanted to hear.[/i] Not what I wanted to discover either. There are at least 10 places in my new app where I set the SELECTION. [i]Sounds like one for the guys at Revelation![/i] Yes! Go for it guys! - Oystein - ---- === At 28 JUN 2002 06:44AM Mike Ruane wrote: === We're looking at it... ---- === At 28 JUN 2002 01:04PM Pat McNerthney wrote: === Oystein, I created a test form with both an edit line and an edit box, and then added a button with the following script: declare function get_property, set_property debug A=get_property(@window:'.EDITLINE_1', 'SELECTION') B=get_property(@window:'.EDITBOX_1', 'SELECTION') C=set_property(@window:'.EDITLINE_1', 'SELECTION', 2:@fm:2) D=set_property(@window:'.EDITBOX_1', 'SELECTION', 2:@fm:2) E=get_property(@window:'.EDITLINE_1', 'SELECTION') F=get_property(@window:'.EDITBOX_1', 'SELECTION') RETURN 0 This script [b]did[/b] set the selection of both of these controls. Both of the subsequent get_property calls returned the just set value. However, Paul is correct that they do not correctly scroll to the selection in the same manner as OI16. This has been fixed and will be made available shortly. Pat ---- === At 28 JUN 2002 05:01PM Oystein Reigem wrote: === Pat, Curious. No matter what I set the SELECTION to I got 1:@FM:0. E.g, I selected a substring manually, then set the SELECTION programmatically to a different selection, and - pop! went the selection. A programmatic get I did afterwards agreed with what my eyes saw (or not saw) - i.e, the SELECTION had become 1:@FM:0. Of course this is what would happen if I used a rubbish value when I set the SELECTION. But I checked my code very carefully. I assume you have a newer version than 4.0.2, but Paul and I both run 4.0.2. And I got the problem and he doesn't. At least that's how I read him. He got the scrolling problem but not the problem I have with setting the SELECTION. Are there different versions of OI 4.0.2's around? Could there be a bug in one of them? I'll go on holiday now. When I'm back I'll upgrade to 4.0.3 and check again. - Oystein - ---- === At 30 JUN 2002 07:24PM Paul Rule wrote: === Thanks Pat. FYI, I tried your example and it does seem to set & retrieve the selection values correctly, except that setting the selection doesn't highlight the text. Cheers Paul ---- === At 30 JUN 2002 08:55PM Pat McNerthney wrote: === Paul, The highlighting does not happen in OI16 either. You will find that if you tab to the edit box or edit line, that it is highlighted when that control has the focus. Pat ---- === At 01 JUL 2002 08:07AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote: === Paul There's a specific style setting for Edit Controls that alters this behaviour: (from the Windows API) "The ES_NOHIDESEL style specifies that the selected text is not hidden when the edit control loses the keyboard focus" [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] [i]World leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.jpg[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=D215CC8D593F1E7885256BE5001F5BDB|View this thread on the forum...]]