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
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
@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
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.
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
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
Contact Gary Beene over at PowerBasic. He runs MLG now. Good Luck.