RICHEDITBOX in Panel-Window (Virtual Height)

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by serge_girard »

In minigui it gives the same bizar behaviour...

Serge
There's nothing you can do that can't be done...
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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
Attachments
Set_Autoscroll.zip
(1.48 MiB) Downloaded 158 times
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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.
Attachments
Set_Autoscroll.7z
(965.25 KiB) Downloaded 151 times
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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
Attachments
RichEditBox_2.zip
(1.48 MiB) Downloaded 152 times
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by edk »

Hi Karl, I will check reported issue on Monday, for the weekend I am without PC access. 8-)
Regards, Edward.
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post by Karl »

Good idea, Edward. Because of Pentecost it will take this time until Tuesday.
Karl
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
edk
Posts: 911
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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.
Attachments
RichEditBox2.7z
(1.06 MiB) Downloaded 144 times
Karl
Posts: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF

Re: RICHEDITBOX in Panel-Window (Virtual Height)

Post 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
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit
Post Reply