PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: MLG  (Read 49 times)

Christian Weilguny

  • Junior Member
  • **
  • Posts: 74
  • FF3 Newbie
MLG
« on: September 22, 2019, 07:23:46 AM »

Hello,
After a long time I had nothing to do with programming in PB now I have a new project.
Of course I have realized, more innovation in PB will not be. But my requirements are not so high and I know the language.
The only one is, I need first the MLG-control. Now I have the FireFly Visual Designer Ver. 3.7 with the included MLG. But there ist in Documentation no hint for resizing the column- and row-headers. And in the .inc-file are constants not described in documentation.
May be, someone have a newer helpfile for the MLG-control? this control meets in all my requirements and I would be happy to use it.

thanks christian
Logged

Klaas Holland

  • Junior Member
  • **
  • Posts: 105
  • FF3 User
Re: MLG
« Reply #1 on: Today at 04:34:31 AM »

This is a bit of code I found in an old PB10 example:

'----------------------------------------------------------------------------------------------------------------------
SUB AddGrid1(BYVAL hDlg AS DWORD)

    LOCAL ART    AS ArtikelType
    LOCAL RC     AS RowColDataType
    LOCAL Ps     AS ASCIIZ * 20000

    CONTROL HANDLE hDlg, %IDC_GRID1 TO hGrid1

    SendMessage hGrid1, %MLG_SETCELL, 0, 0
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 1, 80
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 2, 80
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 3, 80
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 4, 200
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 5, 80
    SendMessage hGrid1, %MLG_SETCOLWIDTH, 6, 80
    SendMessage hGrid1, %MLG_SETHEADERCOLOR, &HFFFFFF, 1

    MLG_FormatColTitles hGrid1,"Datum,Vorig,Aantal,Artikel,Voorraad,RecordNr"
    MLG_FormatColNumber hGrid1,1,8,2,0,1
    MLG_FormatColNumber hGrid1,2,6,2,0,1   '%MLG_JUST_RIGHT 'max 6 integer digits
    MLG_FormatColNumber hGrid1,3,6,2,0,0   '%MLG_JUST_CENTER 'max 6 integer digits

    RC.CellType = %MLG_TYPE_COMBOSTATIC

    SQL_Stmt  %SQL_STMT_IMMEDIATE, "SELECT * FROM Artikel"
    DO
        SQL_Fetch %NEXT_ROW
        IF SQL_EOD THEN EXIT DO

        ART.ArtNr  = SQL_ResColStr(1)
        ART.Omschr = SQL_ResColStr(2)
        Ps = Ps + USING$( "\  \ \                            \," , ART.ArtNr, ART.Omschr)
    LOOP

    RC.List = VARPTR(Ps)
    SendMessage hGrid1, %MLG_SETCOLFORMAT, 4, VARPTR(RC)

    MLG_FormatColNumber hGrid1,5,8,2,0,1   '%MLG_JUST_RIGHT 'max 6 integer digits
    MLG_FormatColNumber hGrid1,6,19,1,0,1   '%MLG_JUST_RIGHT 'max 6 integer digits

END SUB
Logged