Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[module] RaGrid 2.0.1.6-4


  • Please log in to reply
57 replies to this topic
majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
R a G r i d
Advanced grid custom control.


Download          Documentation


Posted Image


Note: RaGrid doesn't support Unicode by design and that will probably never change. Its open-source however.
Posted Image

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
:!: :shock: :O Thanks!
You are a very kind man! :D

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Very interesting, an often asked feature.
I played a bit with the test script, to see what we can do.
I had to add more flexibility to the RA_AddRow function.
#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
}

Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006

You are a very kind man!

You yesterday told me that I am uniquely rude.
How can I be kind and rude at the same time, Skan ?
You want to say that I have multiple personalities like Grumpy or BoBo crew ?
:D

I had to add more flexibility to the RA_AddRow function.

I had no intention to present full blown API to this control, nor that will be the case for others until I need them.

The intention was to do initialisation so you can continue where I stop.

BTW, this control is very very capable. There are like 10 demo exe's provided by author that can show you possibilities. There is also a demo loading MDB (Access databse format). It supports checkboxes, images, graphs, buttons and so on as cell types. To fully wrapp its capatibilities extensive job is required.
Posted Image

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
/OffTopic

You are a very kind man!

You yesterday told me that I am uniquely rude.


Nobody in this forum would believe that I would say so. :D Or would they ? :roll:

Please check my PM again.

I like you because of this unique property of yours

I can assure you that you would not find a single post of mine with that word. ;)

I want to assert again: You are a kind man. You knew I was searching for this but you gave me no hopes, and have posted the solution.

Thank you. :)

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006

Nobody in this forum would believe that I would say so.

Well, there are freaks around, you never know.

You knew I was searching for this but you gave me no hopes, and have posted the solution.

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:

Thank you.

You are welcome.

Now ... if I could only manage to put that 9KB AniGif control online, I guess you will donate ? 8)

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...
Posted Image

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Same author made a spreadsheet out of his grid control!
The main problem is that there is no documentation beside the .inc file...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
The docu is provided as bunch of ASM examples along with the inc file. Its not much of a problem. This morning, I found the RaGrid control, looked all ASM examples code and created wrapper of basic functions in an hour. So, if you know enough of Win internals, its not a problem at all, as all of these controls made to follow standard MS rules and ASM code itself reminds me on AHK :D

You can even register control for entire OS, so any application can create them knowing the class name.

Yup, spreadhseet is one of the 15 "missing controls" I was talking about.
Posted Image

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005

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...


Could you provide a download-link? 8)
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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.
Posted Image

mwharri
  • Members
  • 70 posts
  • Last active: Nov 22 2010 04:34 AM
  • Joined: 15 Mar 2007

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.

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.

Thanks again.

mwharri
  • Members
  • 70 posts
  • Last active: Nov 22 2010 04:34 AM
  • Joined: 15 Mar 2007
Well, the download link does not include any of the new functions.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
:?:
Posted Image

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
New version

- New API's:
RG_About
RG_ScrollCell
RG_ResetColumns
RG_GetHdrText
RG_SetHdrText- New control version 2.0.1.5

Wrapper is standardized and the usage is now the same as with any other wrapper I did.
Posted Image

Buddy
  • Members
  • 11 posts
  • Last active: Jan 23 2011 08:25 PM
  • Joined: 09 Aug 2007
A very nice control. Two questions arise, when using RaGrid:

1.) Is there a possibility to setup the conrol for multi-line selection and how do i get the set of selected rows ?

2.) How can i detect if and what column header is clicked ?

Thanks