PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: MLG  (Read 491 times)

Christian Weilguny

  • Junior Member
  • **
  • Posts: 76
  • 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: September 23, 2019, 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

Christian Weilguny

  • Junior Member
  • **
  • Posts: 76
  • FF3 Newbie
Re: MLG
« Reply #2 on: September 23, 2019, 11:46:57 AM »

@Klaas

Thanks for your answer. This methods have I found too.
For what I look is the method to alter the height of column-header and the width of row-header.
I have no hint found to do that.

christian
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8937
  • Windows 10
    • PlanetSquires Software
Re: MLG
« Reply #3 on: September 23, 2019, 02:41:52 PM »

The original author, James Klutho, sold MLG to Gary Beene quite a while ago. James sometimes visits this forum but maybe he won't see your post in time. You could post your question over on the PB forum because Gary is still very active over there. I have not used MLG enough to be able to offer help.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

James Klutho

  • Senior Member
  • ***
  • Posts: 233
  • Petroleum Software Solutions
Re: MLG
« Reply #4 on: September 23, 2019, 04:16:04 PM »

I haven't looked at MLG in ages, but if I remember right:

SendMessage hGrid1, %MLG_SETCOLWIDTH, 0, 80     ' should set the row header width to 80 pixels
SendMessage hGrid1, %MLG_SETROWHEIGHT, 0, 30     ' should set the column header height to 30 pixels

The zero element of the 2 dimensional string array are the row and column header strings.  I know one or more of the demo source examples use this.

Jim
Logged

Christian Weilguny

  • Junior Member
  • **
  • Posts: 76
  • FF3 Newbie
Re: MLG
« Reply #5 on: September 24, 2019, 07:30:16 AM »

A lot of thanks Jim, this works!
Another question: It is possible to get a license for this grid-tool? For my active project I don't need, but in future may be ...

Christian
Logged

James Klutho

  • Senior Member
  • ***
  • Posts: 233
  • Petroleum Software Solutions
Re: MLG
« Reply #6 on: September 24, 2019, 09:20:46 AM »

Contact Gary Beene over at PowerBasic.  He runs MLG now.  Good Luck.
Logged