Page 18 of 23
Posted: Fri Jul 03, 2009 5:20 am
by Poshu
Hmm (I'm trying to get ready to be looked as a fool), How to use rightclick with Esgrid? There is no such constant as "#Egrid_RightClick" in the callback section T_T
Posted: Fri Jul 03, 2009 9:52 am
by srod
Posted: Fri Jul 03, 2009 1:16 pm
by Poshu
I knew I would look stupid >.<;
Thanks!
Posted: Fri Jul 03, 2009 1:36 pm
by srod
Poshu wrote:I knew I would look stupid >.<;
Thanks!
I wouldn't worry about that; with my trousers on back to front and pulled up to my arm-pits, I always look stupid!

Posted: Mon Jul 06, 2009 12:44 am
by Poshu
srod wrote:I wouldn't worry about that
Yeah, I'm starting to be used to it anyway...
Hey! Question (Mark II): Is there any way to know how many rows are going to be pasted during the next egrid_pastecells()?
Posted: Mon Jul 06, 2009 9:34 am
by srod
Poshu wrote:srod wrote:I wouldn't worry about that
Yeah, I'm starting to be used to it anyway...
Hey! Question (Mark II): Is there any way to know how many rows are going to be pasted during the next egrid_pastecells()?
Not without examining the clipboard text yourself. Not even EsGRID knows that until it gets stuck into the business of pasting the data!
EsGRID assumes that a Chr(13) character delimits the end of a row (as is the case when copying from Excel). So, to get the number of rows, retrieve the clipboard text and then use CountString() (for example) to count the number of occurrences of the Chr(13) character. Then, in the case that the last character pasted does not equal Chr(13), add 1 to this count.
You must remember though that EsGRID discards any data being pasted which would lie outside of the grid; unless you take steps to circumvent this of course.
Posted: Tue Jul 28, 2009 12:05 pm
by srod
EsGRID version 1.3.4 - 28th April 2009.
Version 1.3.4 of EsGRID fixes several bugs encountered with EsGRID during my work upon the Pyrex report designer. Most of these were related to the Nexus property box control.
This version also adds an additional optional parameter to the egrid_SelectCell() function which allows the developer to specify that the newly selected cell is not scrolled into view (if scrolling would otherwise be required).
http://www.nxsoftware.com
Posted: Tue Jul 28, 2009 2:05 pm
by ts-soft
> EsGRID version 1.3.4 - 28th April 2009.
thx for the three month old version

Posted: Tue Jul 28, 2009 5:41 pm
by srod
ts-soft wrote:> EsGRID version 1.3.4 - 28th April 2009.
thx for the three month old version

I uhm don't know what you mean!
srod scuttles away whilst whistling to himself...

Posted: Fri Aug 28, 2009 6:08 am
by nemo.lechat
Hi, I've been using Esgrid for a few monthes and i think it's a great app !
But I have a small problem: I need to have a cell where I can verticaly scroll inside the cell if there are a few lines of text.
Is this possible ?
PS: I'm using #egrid_MultiLineText at the creation of the grid.
Posted: Fri Aug 28, 2009 11:17 am
by srod
Sorry, no that is not possible.
Posted: Fri Aug 28, 2009 2:02 pm
by nemo.lechat
Too bad.....I really needed it !
I'll have to find another way to do it... maybe using a listbox inside a cell is possible ?
Anyone have a suggestion ?
/me scratching his head
Posted: Fri Aug 28, 2009 2:25 pm
by srod
EsGRID is really not geared towards allowing the user to embed arbitrary controls within a grid. This would really require a completely different approach to the grid control itself. Not even pulling out my huge bag of dirty tricks would be of much use with EsGRID as it does have to remain firmly within the bounds of a Windows ListView control upon which it is based.
Generally speaking there are two means of implementing a custom grid; that taken by Excel for example (which uses two controls to implement just the basic grid) and those used by what I would call more traditional grid controls (EsGRID lies within this second categeory by default because of the fact it is based upon a Windows ListView - even though it does utilise a separate header control) in which a single control is used housing both header cells and non-header cells (forget the Windows header control for the moment). Only grids utilising an inner control to house just the non-header cells (such as Excel) can easily allow the user to embed arbitrary controls etc. All other grids have to adopt all kinds of dirty tricks and, in the case of EsGRID, is just not really viable.
I know of at least one person who has successfully managed to embed a calendar control within an EsGRID, but the situation was such that there were certain factors which allowed for the entire process to be simplified, something which will not hold in general, even for calendar controls.
I am currently working on a new grid control (as I am in need of some features which EsGRID cannot ever offer) but not even this new control will allow us to embed arbitrary controls.
Posted: Mon Aug 31, 2009 9:57 am
by nemo.lechat
Thank you for the answer !
I'll have to find anotherway to see a few lignes of text (maybe tooltips..)

Posted: Tue Sep 01, 2009 10:22 am
by HeX0R
Hi srod,
it seams since 1.3.4 the "single click select" is no more functional?
Taken directly from help file:
Code: Select all
XIncludeFile "EsGRID.pbi"
Procedure.l MyCellCallBack(egrid, uMsg, *cellinfo.egridCellInfo)
Protected result
Select uMsg
Case #egrid_SelectCell
;Check whether the cell was selected using the mouse.
If *cellinfo\param = #egrid_LeftClick
egrid_HideEdit(egrid) ;Hides the selection border.
egrid_SelectCell(egrid, *cellinfo\column, *cellinfo\row, #True) ;Selects the cell in 'edit mode'.
result = #False ;No point getting the Egrid to select the cell as well.
Else
result = #True
EndIf
Case #egrid_NotifyCellType
*cellinfo\celltype = #egrid_String
*cellinfo\text = ""
Default
result = #True ;Ensures default processing for those messages we do not process.
EndSelect
ProcedureReturn result
EndProcedure
OpenWindow(0, 0, 0, 300, 300, "", $C8001)
egrid_CreateGrid(0, 5, 5, 495, 500, 18, #egrid_NoHeaderButtons | #egrid_GridLines, #egrid_ResizeColumnsTrue | #egrid_RequestCellTooltips)
egrid_SetHeaderHeight(0, 22)
egrid_CreateCellCallback(0, @MyCellCallBack())
egrid_AddColumn(0, 0, "aaa", 100)
egrid_AddColumn(0, 1, "bbb", 90)
egrid_AddColumn(0, 2, "ccc", 100)
egrid_AddRows(0, -1, 50)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
or did i miss something?