Results 1 to 3 of 3

Thread: How to enable Insert-mode on (db)Forms with Mask_Numeric_Window ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3

    Default Re: How to enable Insert-mode on (db)Forms with Mask_Numeric_Window ?

    Hi Raveen,

    That's an interesting bug you found there.

    With the following code, the insert behavior works as expected.
    Code:
    Use DfAllEnt
    Object oPanel is a Panel
        Set Size to 300 300
        Object oForm is a Form
          Set Size to 13 100
          Set Location to 36 57
          Set Value to "12456"
          Procedure OnEnterObject Handle hoFrom
            Forward Send OnEnterObject hoFrom
            If (GetKeyState(VK_INSERT)) Begin
              Showln "TRUE"
            End
            Else Begin
              Showln "FALSE"
            End
          End_Procedure
        End_Object    
    End_Object
    Start_UI
    But as soon as you set the datatype mask, insert mode is completely ignored.
    Code:
    Use DfAllEnt
    Object oPanel is a Panel
        Set Size to 300 300
        Object oForm is a Form
          Set Size to 13 100
          Set Location to 36 57
          Set Value to "12456"
          Set Form_Datatype to Mask_Numeric_Window // the difference
          Procedure OnEnterObject Handle hoFrom
            Forward Send OnEnterObject hoFrom
            If (GetKeyState(VK_INSERT)) Begin
              Showln "TRUE"
            End
            Else Begin
              Showln "FALSE"
            End
          End_Procedure
        End_Object    
    End_Object
    Start_UI
    As you can see from the showln's the insert mode is actually set. The DataFlex form just chooses to ignore that.
    I think it needs a runtime fix.

    --
    Wil
    Last edited by wila; 5-Nov-2019 at 04:54 PM. Reason: Reversed=false logic as I had started with the intention to write a fix, instead it turned out a runtime thing

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •