Advanced grid custom control.
Download Documentation
![Posted Image](https://ahknet.autohotkey.com/~majkinetor/RaGrid/images/RaGrid.png)
Note: RaGrid doesn't support Unicode by design and that will probably never change. Its open-source however.
#SingleInstance, force Gui, +LastFound +Resize hwnd := WinExist() RG_Init() hGrd := RG_Add(hwnd, 4, 4, 500, 300, STYLE_VGRIDLINES | STYLE_GRIDLINES ) RG_AddColumn(hGrd, "cap=Name", "w=150", "ha=2", "ca=2" ) RG_AddColumn(hGrd, "cap=Ext", "w=50", "ha=1", "ca=1") RG_AddColumn(hGrd, "cap=Time", "w=125", "ha=1", "ca=1") RG_AddColumn(hGrd, "cap=Size", "w=75", "ha=1", "ca=1") RG_SetFont(hGrd, "s10 bold, Arial") RG_SetColors(hGrd, "BAAEEFF G551100 T005588") Loop %A_WinDir%\*.bmp { aCol1 := A_LoopFileName aCol2 := A_LoopFileExt FormatTime aCol3, %A_LoopFileTimeModified%, yyyy-MM-dd HH:mm:ss aCol4 := A_LoopFileSize RG_AddRow(hGrd, "aCol") } RG_SetHdrHeight(hGrd, 30) RG_SetRowHeight(hGrd, 22) RG_Sort(hGrd, 0, 1) Gui, Show, w510 h310 return GuiClose: GuiEscape: ExitApp InsertInteger(pInteger, ByRef pDest, pOffset = 0, pSize = 4) { Loop %pSize% ; Copy each byte in the integer into the structure as raw binary data. DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF) } #Include RaGrid.ahk
RG_AddRow(hGrd, aColName){ local RAW, colCount SendMessage GM_GETCOLCOUNT,,,, ahk_id %hGrd% colCount := ErrorLevel VarSetCapacity(RAW, 4 * colCount, 0) Loop %colCount% { InsertInteger(&%aColName%%A_Index%, RAW, (A_Index - 1) * 4) } SendMessage,GM_ADDROW,0,&RAW,, ahk_id %hGrd% return ErrorLevel }
You yesterday told me that I am uniquely rude.You are a very kind man!
I had no intention to present full blown API to this control, nor that will be the case for others until I need them.I had to add more flexibility to the RA_AddRow function.
You yesterday told me that I am uniquely rude.You are a very kind man!
I can assure you that you would not find a single post of mine with that word.I like you because of this unique property of yours
Well, there are freaks around, you never know.Nobody in this forum would believe that I would say so.
Acctually, there are other Extreme Grid controls around, waiting to be found by inocent civilians... some look like Excell in 20K dll... Perhaps when your "client" start to be more demanding :lol:You knew I was searching for this but you gave me no hopes, and have posted the solution.
You are welcome.Thank you.
Acctually, I have collection of "missing controls" here, like 15 of them collected from different ASM forums in previous days, doing all kind of stuff in ridiculously small dll's - playing videos, simulating paint, lil' hex editors etc... All of these controls together are like 150K, waiting for the civilians to notice them...
Awesome job...I'll work on expanding the properties dialog to include the new functions. I should have a decent amount of work done by the end of the weekend.A new version, very functional and ready.
The only thing I didn't wrap are notification handlers for text change, button clicks etc. This is fairly trivial to add, but I didn't have time now.