Recent Posts

Pages: [1] 2 3 ... 10
1
EGrid / How to get eGrid notifications in FireFly?
« Last post by John Montenigro on October 02, 2017, 10:28:22 am »
I've been using Firefly for awhile, and I've had the eGrid Pro grid for a couple of years, but I'm only just now trying to use them together.

I've made a lot of progress getting my grid created, columns sized, headers in place in color, columns read-only, and even column formats set!

But one thing that is now eluding me has to do with limiting the characters and the length of the string that the user can enter into a given cell.

As best I can tell, you cannot set a character string "filter" on a column, but it does seem that you can set such a filter "per-cell" or globally.

In order to set the "global" filter string, I have to use %EG_SETCHARACTERLIST. (I copied the sample code...)

Then, in order to switch to the global filter, I have to detect when the user starts editing a particular cell and invoke %EG_SetFilterMode to %EG_ALLOWCHARACTERS (I think!)

Then I have to detect when the user finishes editing, I switch to "all characters" (no filter) by invoking %EG_SetFilterMode to %EG_ALLOWALL

My problem is: HOW DO I DETECT the EGN_STARTEDEDITION  and EGN_FINISHEDIT notification messages?

I've tried to use the Firefly-specific "CUSTOM" routine, but it looks like that's not communicating with eGrid...


Code: [Select]
Function FRMENTERBATCHES_EGRID321_CUSTOM ( _
                                         ControlIndex  As Long,  _  ' index in Control Array
                                         hWndForm      As Dword, _  ' handle of Form
                                         hWndControl   As Dword, _  ' handle of Control
                                         wMsg          As Long,  _  ' type of message
                                         wParam        As Dword, _  ' first message parameter
                                         lParam        As Long   _  ' second message parameter
                                         ) As Long

   'I *think* this is how/where we will detect when a user begins editing a cell...
   Local lRet As Long, sTemp as string   

   Local X     As Long
   Local Y     As Long
   Local CurX  As Long
   Local CurY  As Long

   Local EGN As EgridNotify Ptr   ' Egrid32 Notification structure pointer

   Select Case wMsg

   Case %WM_COMMAND


   Case %WM_NOTIFY

'      If wParam <> hWndControl Then Exit Select        '  is this best?   ...not sure...

      EGN = lParam  ' this is OK

      CurX = @EGN.Cell.x   ' this is the main selected cell in a multi-cell selection...
      CurY = @EGN.Cell.y

      ? "We should have X and Y",,"DEVTEST"      ' NOT DISPLAYING!!!!   So, then how to catch eGrid notifications!!????

      Select Case @EGN.HDR.Code        ' catch eGrid messages

      Case %EGN_STARTEDEDITION                                    ' or?       %EGN_STARTEDIT        %GC_STARTEDIT               '    how to detect? !!!!!

         ? "You started to edit cell: " & Trim$(@EGN.Cell.X) & ", "  &  Trim$(@EGN.Cell.Y)      ' this is the main selected cell in a multi-cell selection...

         If x = %GridColIngActAmt Or x = %GridColProgWt  Then 
            lRet = SendMessage(hGrid, %EG_SETFILTERMODE, %EG_ALLOWCHARACTERS Or %EG_IGNORECASE, 0)       ' when editing numeric cells
         End If

'         'Get the current entered value
'         sTemp  = Cell_GetText(CurX, CurY)

      Case %EGN_EDITIONCLOSED                           ' or?     EGN_CANCELEDIT    %EGN_FINISHEDIT     
         ? "You finished editing cell: " & Trim$(@EGN.Cell.X) & ", "  &  Trim$(@EGN.Cell.Y)

         lRet = SendMessage(hGrid, %EG_SETFILTERMODE, %EG_ALLOWALL, 0)                                ' when editing non-numeric cells


      End Select

   End Select

End Function


Can anyone spot what I'm doing wrong? I'd greatly appreciate guidance from a wiser, more experienced coder!

 Thanks,
 -John
2
General Discussion / Is there still a free or trial version available.
« Last post by gdmellott on November 17, 2015, 11:32:19 pm »
I worked with EGrid32 for a while and was impressed with its potential.  There was some concern at getting more involved with it when an antivirus program said it was infected.  Is there still a trial or free version available?
3
General Discussion / Re: Some fixes needed
« Last post by may on October 19, 2015, 08:10:40 am »
Guess everyone is happy
4
General Discussion / Re: Some fixes needed
« Last post by may on July 12, 2015, 09:14:12 am »
BBS is still running.  That is good.
5
General Discussion / Re: Some fixes needed
« Last post by may on August 31, 2014, 07:53:46 am »
Haven't seen any activity in years.
Has anyone had any problems?
No news can be good news, hope all is well!

6
General Discussion / Re: Great to see some activity concerning EGrid..
« Last post by may on August 31, 2014, 07:52:30 am »
Are you okay?
7
General Discussion / Re: SLL for EGrid status
« Last post by may on August 31, 2014, 07:50:08 am »
Just checking
8
General Discussion / Re: SLL for EGrid status
« Last post by ddormier on December 07, 2013, 03:44:06 pm »
How goes the SLL and latest release?
9
EGrid / Re: Compiled demo available ?
« Last post by David Kenny on September 08, 2013, 02:53:45 am »
Thanks Brian!
10
General Discussion / Re: SLL for EGrid status
« Last post by Brian Chirgwin on September 06, 2013, 06:32:19 pm »
Yes. I am putting the finishing touches on an update.

I'll be posting a announcement soon.
Pages: [1] 2 3 ... 10