April 19, 2024, 02:31:35 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Mini Grid class

Started by sapero, October 22, 2008, 03:32:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

This is a class which makes possible to easy edit list view cells. Just single click (or double click) makes the cell editable.
The included example program shows also how to change font in one of list view columns.

Haim

Sapero,
Great program!
Thanks for sharing this.

Haim

sapero

Thanks Haim.

I've attached extended version with drag-drop support, build on standard ole interfaces IDataObject, IDropSource and IDropTarget.
There is additional CDragDrop class with just one method StartDragDrop.
Drag-drop is initiated from CApp::OnBeginDrag, fired by list view notification  LVN_BEGINDRAG.

I have also splited the root cases in OnNotify method.
Happy study :)

Ionic Wind Support Team

That's great Sapero. 

You must have a little camera sitting behind me, as I was just working on example drag and drop classes for Emergence using standard ole interfaces. ;)  It will be interesting to compare the two.

Paul.

Ionic Wind Support Team

talun

Sapero, many thanks for the code. I've just a problem during the rebuilding of the project:

Compiling...
main.eba
File: C:\bbb\main.eba (72) Warning: Uninitialized variable: app
grid.eba
......


Hovewer the program starts and seems to work fine.

Any suggestions?

bye

Sergio

Ionic Wind Support Team

Sergio,
It's a warning, not an error.  And can be ignored. 

Paul.
Ionic Wind Support Team

talun


sapero

The third version displays an insertion mark, and automatically scrolls the list view when needed. All this in dragdrop.src. You find here also autorepeat implementation, which scrolls the listview with full speed after some time.

When you are editing a cell and scroll the list view or mouse wheel, the edit control will now hide. Scrolling events are detected in subclassed listview procedure (grid.src).

LarryMc

Sapero,

How hard would it be to make your Mini Grid windows based instead of dialog based?

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

sapero

It's not much work, you'll need to replace CreateDialog with OpenWindow, IDINITDIALOG with IDCREATE, clear WINDOW type before opening the window, return directly the value from OnCustomDraw and from OnNotify, instead saving the return value in DWL_MSGRESULT.
Attached zipped main.eba modified to use a window.

LarryMc

Thanks again, Sapero

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library