Multiline Edit : Insert always on.

Multiline Edit : Insert always on.

Postby Milan Mehta » Thu Dec 14, 2006 10:10 am

Dear All,

I am using May-2006 build. In multi line Get Insert mode always on. Even if I press Ins key, there is no effect.

How to enter Overwrite mode ?

TIA
Milan.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Re: Multiline Edit : Insert always on.

Postby ukoenig » Mon Jul 29, 2019 10:17 am

the problem still exists.
Now I have the same problem. :(
I added a clear-button but that helps only for new text

How to change to overwrite mode.
The normal get works.

Works only on a normal get
READINSERT( .F. )

I tested FGET where overwrite works
REDEFINE FORMAT GET oGet[4] VAR cText1 ID 210 OF oFld:aDialogs[ 1 ] UPDATE FONT oFontSys


Image

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Multiline Edit : Insert always on.

Postby dtussman » Fri Feb 10, 2023 7:58 pm

Hello, did you ever find a solution for toggling insert mode using multiline? I'm having the same problem, stuck in insert mode
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Multiline Edit : Insert always on.

Postby karinha » Fri Feb 10, 2023 8:25 pm

Hello,

Code: Select all  Expand view

   Set(  _SET_INSERT,  lOnOff  )
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Multiline Edit : Insert always on.

Postby dtussman » Fri Feb 10, 2023 9:20 pm

Karinha,

That would work with a normal get but the issue is that it doesn't work with a multiline get.

David
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Multiline Edit : Insert always on.

Postby karinha » Sat Feb 11, 2023 2:59 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Multiline Edit : Insert always on.

Postby dtussman » Sun Feb 12, 2023 4:04 am

Thats all too complicated for me. I need a simple solution, LOL
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Multiline Edit : Insert always on.

Postby Jimmy » Sun Feb 12, 2023 5:40 am

hi,

what about GotFocus() / LostFocus() (WHEN / VALID ) :?:

i do "switch" Numlock this Way under HMG

Code: Select all  Expand view
   bGotFocus := {|| lOldKey:= SetNumLock() }
   bLostFocus := {|| SetNumLock( lOldKey ) }

i think Fivewin have equal Function to "switch Insert"
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Multiline Edit : Insert always on.

Postby karinha » Sun Feb 12, 2023 2:48 pm

dtussman wrote:Thats all too complicated for me. I need a simple solution, LOL


https://forums.fivetechsupport.com/viewtopic.php?f=3&t=23457&p=239063#p239063

Test and say if it works.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Multiline Edit : Insert always on.

Postby karinha » Sun Feb 12, 2023 2:57 pm

Now you can. Apologies for the delay.

Code: Select all  Expand view

// C:\FWH..\SAMPLES\NUM_CAPS.PRG

#include "fivewin.ch"
*#include "Dll.ch"

*----------------------------------------------------------------------
* Vejam como funciona
*----------------------------------------------------------------------
* SETCAPSLOCK( .T. ou .F. )  = Liga e desliga o Capslock
* SETNUMLOCK( .T. ou .F. )   = Liga e desliga o NumLock
* SETSCROLLOCK( .T. ou .F. ) = Liga e desliga o ScrollLock
* SETINSERT( .T. ou .F. )    = Liga e desliga o Insert
*----------------------------------------------------------------------
* VERCAPSLOCK()  = Sem parametros retorna o estado do Capslock
* VERNUMLOCK()   = Sem parametros retorna o estado do NumLock
* VERSCROLLOCK() = Sem parametros retorna o estado do ScrollLock
* VERINSERT()    = Sem parametros retorna o estado do Insert
*----------------------------------------------------------------------

/*
*************
function MAIN
*************

? SETCAPSLOCK( .F. )
? "Desligando o CapsLock"
SETCAPSLOCK( .T. )
? "Ligando o CapsLock"
SETCAPSLOCK( .F. )
? "Desligando o CapsLock"
SETCAPSLOCK( .T. )
? "Ligando o CapsLock"
SETCAPSLOCK( .F. )
? "Desligando o CapsLock"

? "O Capslock esta' " + iif( VERCAPSLOCK(), "Ligado", "Desligado" )

SETNUMLOCK( .F. )
? "Desligando o NumLock"
SETNUMLOCK( .T. )
? "Ligando o NumLock"
SETNUMLOCK( .F. )
? "Desligando o NumLock"
SETNUMLOCK( .T. )
? "Ligando o NumLock"
SETNUMLOCK( .F. )
? "Desligando o NumLock"

? "O Numlock esta' " + iif( VERNUMLOCK(), "Ligado", "Desligado" )

SETSCROLLOCK( .F. )
? "Desligando o ScrollLock"
SETSCROLLOCK( .T. )
? "Ligando o ScrollLock"
SETSCROLLOCK( .F. )
? "Desligando o ScrollLock"
SETSCROLLOCK( .T. )
? "Ligando o ScrollLock"
SETSCROLLOCK( .F. )
? "Desligando o ScrollLock"

? "O ScrollLock esta' " + iif( VERSCROLLOCK(), "Ligado", "Desligado" )

SETINSERT( .T. )
? "Ligando o Insert"

SETINSERT( .F. )
? "Desligando o Insert"

? "O Insert esta' " + iif( VERINSERT(), "Ligado", "Desligado" )

return NIL
*/


*------------------------------------------------------------*
*            FUNCAO PARA ATIVAR A TECLA CAPSLOCK             *
*------------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( SETCAPSLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

if( (hb_parl(1) && !(keyState[VK_CAPITAL] & 0)) || (!hb_parl(1) && (keyState[VK_CAPITAL] & 1)) )
    {
      keybd_event( VK_CAPITAL, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
      keybd_event( VK_CAPITAL, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
    }
}

#pragma enddump

*-----------------------------------------------------------*
*            FUNCAO PARA ATIVAR A TECLA NUMLOCK             *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( SETNUMLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

if( (hb_parl(1) && !(keyState[VK_NUMLOCK] & 0)) || (!hb_parl(1) && (keyState[VK_NUMLOCK] & 1)) )
    {
      keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
      keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
    }
}

#pragma enddump

*-----------------------------------------------------------*
*            FUNCAO PARA ATIVAR A TECLA SCROLLOCK           *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( SETSCROLLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

if( (hb_parl(1) && !(keyState[VK_SCROLL] & 0)) || (!hb_parl(1) && (keyState[VK_SCROLL] & 1)) )
    {
      keybd_event( VK_SCROLL, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
      keybd_event( VK_SCROLL, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
    }
}

#pragma enddump

*-----------------------------------------------------------*
*            FUNCAO PARA ATIVAR A TECLA SCROLLOCK           *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( SETINSERT )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

if( (hb_parl(1) && !(keyState[VK_INSERT] & 0)) || (!hb_parl(1) && (keyState[VK_INSERT] & 1)) )
    {
      keybd_event( VK_INSERT, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
      keybd_event( VK_INSERT, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
    }
}

#pragma enddump

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( VERCAPSLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

hb_retl( keyState[VK_CAPITAL] );
}

#pragma enddump

*-----------------------------------------------------------*
*            FUNCAO PARA VERIFICAR A TECLA NUMLOCK          *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( VERNUMLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

hb_retl( keyState[VK_NUMLOCK] );
}

#pragma enddump

*-----------------------------------------------------------*
*          FUNCAO PARA VERIFICAR A TECLA SCROLLOCK          *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( VERSCROLLOCK )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

hb_retl( keyState[VK_SCROLL] );
}

#pragma enddump

*-----------------------------------------------------------*
*          FUNCAO PARA VERIFICAR A TECLA SCROLLOCK          *
*-----------------------------------------------------------*

#pragma begindump

#define _WIN32_IE 0x0500
#define HB_OS_WIN_32_USED
#define _WIN32_WINNT 0x0400

#include <windows.h>
#include "hbapi.h"

HB_FUNC ( VERINSERT )
{
BYTE keyState[256];

GetKeyboardState((LPBYTE)&keyState);

hb_retl( keyState[VK_INSERT] );
}

#pragma enddump
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests