Grid type Control

Started by Petrus Vorster, May 10, 2015, 06:20:21 PM

Previous topic - Next topic

Klaas Holland

David,

With help from this forum by Rudolf Furstauer.

I think the EditBox and Combobox should disappear when you try to do something else.

Paul,

Here is the FF-FB version.
I build the forms from scratch, so the Forms-functions must be Ok.
The parts that don't work are commented out.

Thanks it advance.

Btw.:   The Example Addressbook does not work either because of:

    If (Index <= UBound(gAddressBook(1))) And (Index >= LBound(gAddressBook(1))) Then
       Temp = gAddressBook(Index)
    End If

David Kenny

Quote from: Klaas Holland on May 13, 2015, 07:19:06 AM
I think the EditBox and Combobox should disappear when you try to do something else.
Fair enough.

You just commented on the my ramblings about what I would do.  I just wanted to make sure that you did get that there are two bugs in the version you posted.  They are minor drawing artifacts and possible incorrect size/location of the edit or combo box that happen when either a column is resized when in edit mode, or when the user scrolls the listview in the horizontal (also while in edit mode).  Canceling the edit should work for either case.

Paul Squires

Quote from: Klaas Holland on May 13, 2015, 07:19:06 AM
Paul,

Here is the FF-FB version.
I build the forms from scratch, so the Forms-functions must be Ok.
The parts that don't work are commented out.

Hi Klaas,

I have attached a working FreeBASIC example for you. I added additional code to the FB version that you had in your PB version (but was missing from your download attachment). The FB example should now run similar to your PB example.

You will also need to copy the attached FF_ListView_GetCountPerPage.inc file into your CodeStore/FreeBasic/ListView folder.
Paul Squires
PlanetSquires Software

Klaas Holland

Paul,

Thank you for your help, now I can study the differences between PB and FB.

David,

Thank you for your bug-report.
I think this will fix it:

'--------------------------------------------------------------------------------
Function FORMT1_LISTVIEW1_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

    Select Case wMsg
        Case %WM_PARENTNOTIFY, %WM_HSCROLL, %WM_VSCROLL, %WM_MOUSEWHEEL   
            FF_Control_ShowState HWND_FORMT1_TEXT1, %SW_HIDE
            FF_Control_ShowState HWND_FORMT1_COMBO2, %SW_HIDE

    End Select

End Function


I also updated the FF-PB version of May 11, 2015.

Klaas