Page 2 of 3

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Mon May 15, 2017 2:14 pm
by serge_girard
In minigui it gives the same bizar behaviour...

Serge

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Tue May 16, 2017 9:58 am
by Karl
serge_girard wrote: Mon May 15, 2017 2:14 pm In minigui it gives the same bizar behaviour...

Serge
Hi Serge,

seems to be a bug. I tried several versions:

Version A:
1. Main-Window
2. Second window as modal-window-virtual-height (toolbox is not possible here). With controls before RichEditBox and behind. This version works perfect. I enter the RichEditBox always on the top.

Version B:
1. Main Window
2. Second window as modal-window-vitual-height calling a third window modal or panel. This version gets wrong. When I enter the RichEditBox the window moves up and I see the bottom. For writing, I need the slider.

I hope, one of the masters can help me. It would be great.

Regards Karl

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Fri Jun 02, 2017 12:08 pm
by Karl
Hi to all,

I found out, that this strange behaviour has nothing to do with a PANELTYPE window. When I jump from one TextBox to the next and finally come into the RichEditBox the cursor stands at the beginning of the Box. But the window turns down at the end of the Box. This has to do with "SET AUTOSCROLL ON". If I set it to OFF, the jumping of the window doesn´t happen. But this is a drawback, because now I need the vertical-slider to come to the controls before and behind my RichEditBox.

It´s a very annoying behaviour (Serge named it "bizarre"). If any of you, my dear friends, could fix this bug, I would be very much obliged. In the appendix I once again add a simple example.

Karl

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Fri Jun 02, 2017 1:37 pm
by edk
Hi Karl.
You can "force" the scrolling position:

Code: Select all

@ 370,72  RICHEDITBOX Edit_1 OF Form_3 ;
          WIDTH 695 ;
          HEIGHT 460 ;
          VALUE '' ;
          FONT 'Times New Roman' SIZE 12 ;
          ON GOTFOCUS _HMG_PRINTER_SETVSCROLLVALUE( GetFormHandle ( 'Form_3' ) , 370 ) ;
          ON LOSTFOCUS nil ;          
          NOHSCROLL
where: _HMG_PRINTER_SETVSCROLLVALUE( GetFormHandle ( 'Form_3' ) , 370 ) ;
'Form_3' - is current window (form) name
370 - is position of v scroll, in this case the RichEditBox nRow

Edward.

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Fri Jun 02, 2017 3:11 pm
by Karl
Dear EDK,

Once again you could help me with your profound knowledge. I appreciate that very much and thanks a lot. But there is still a very little hair in the soup. When the RichEditBox is loaded with text and I do not enter it over TAB or ENTER from the former controls. I enter it with a mouseclick because I cannot wait.... The cursor is at the start of the Box but a lot of text is marked. I´ll add this in my sample and send it.

Karl

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Fri Jun 02, 2017 4:42 pm
by Karl
Hi Edward,
sorry, I didn´t see your first name in your last post. Now the new sample in the attachment. Unfortunately the text in the RichEditBox is in German. I think this doesn´t matter.
Karl

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Fri Jun 02, 2017 5:54 pm
by edk
Hi Karl, I will check reported issue on Monday, for the weekend I am without PC access. 8-)
Regards, Edward.

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Sat Jun 03, 2017 4:42 am
by Karl
Good idea, Edward. Because of Pentecost it will take this time until Tuesday.
Karl

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Mon Jun 05, 2017 1:32 pm
by edk
Hi Karl.
Solution without changing HMG sources, it may be (in a dirty way) execution of UnSelectAll after the time it takes to complete the event.

Code: Select all

FUNCTION changekey ()
ON KEY TAB OF Form_3 ACTION HMG_PRESSKEY(17, 9)
ON KEY ESCAPE OF Form_3 ACTION Form_3.Text_2.SETFOCUS
_HMG_PRINTER_SETVSCROLLVALUE(GetFormHandle('Form_3'), 350)
Millisec(50)
Form_3.Edit_1.UnSelectAll
Millisec(50)
RETURN Nil
Maybe that will solve your issue.

Edward.

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Posted: Tue Jun 06, 2017 7:09 am
by Karl
Good morning Edward,
I´m happy, problem solved. I changed Millisec into 10, because of the flickering of the RichEditBox. I thank you very much again. This is the reason why I love HMG so much. There is always someboody who can help me.
Have a good week.
Karl