The subject says it all, having all kinds of problems getting things to work.
OK, to begin I have a form and I'm using (without much success) SIgrid as a data input grid control for a Civil Engineering app. To be fair I have sent e-mails to Mr. Bristow via his web site for help and so far I have yet to receive an answer, I hope he hasn't given up on SIgrid support.
Problem 1, the grid cells should accept input of 12 characters, but now will only accept characters to what appears to be the width of the text in the header row, which amounts to about 6 lowercase or 4 uppercase letters. Can't find what is causing this phenomenon. SI grid does not exhibit this behavior under PBForms.
Problem 2, it would appear that the SI grid control is somewhat inconsistent in its handling of mouse events. The RTCLICK event does not fire when the text cursor is inside of a cell. So I assume I need to provide the code to respond to this event myself, so where does this code go? In the SI grid CUSTOM code block? Would like to be able to trap the "F1" key as well.
Problem 3, Firefly is outputting code for the siSetRowHeight function using 4 arguments, my SIGRID.inc file only indicates 3 arguments should be specified. Can this be fixed?
Problem 4, OK so I ran aground with SI grid and tried to use the ListView control as a substitute, only to find that (thud) there is no Columns property or anything that appears to set the number of columns for the ListView control from the Designer. So how does one set the number of columns and corresponding header text? Hmmmm, if there ever was a need for a wishlist item this could be it. How about a Rows/Columns property for the ListView control?
I'm really trying here, but the frustration level is incredibly high right now. Considering going back to (ugh!) VB6.
Hello,
Don't know about questions 1,2 and 3. Have been using Egrid, much more powerfull grid.
Question 4:
Setting columns in the Listview control from the designer is indeed not possible at the moment.
A simple
FF_ListView_InsertColumn (HWND_FORM1_LISTVIEW1, 0, "col1", 1, 100)
in the WM_CREATE section will insert a column with header text "col1"
A lot of wrappers functions are availlable in Firefly the will make it easier to program. Look under F8 or in the help.
I know the feeling, beeing an ever lasting newbie myself. Vb is nice and has it's place but the combination of PB and firefly can get you to levels you never thought were possible.
Marc
Hi,
I use SiGrid without any problem with FireFly.
Nevertheless, I can't help you for Problem 1 and Problem 2; I'm sorry for that.
For problem 3, can you check the SiGrid.inc; on my PC the definition for the siSetRowHeight function is using 4 arguments :
Declare Function siSetRowHeight Lib "SIGRID.DLL" Alias "SETROWHEIGHT" (ByVal hWnd As Long, ByVal RowHeight As Long, ByVal Row As Long, Optional ByVal ResizeEdit As Long) As Long
The last version of the SiGrid.inc should be place here :
C:\Program Files\FireFly Visual Designer\CustomControls\Software Innovators\SiGrid
Jean-Pierre
Marc,
Quote
I know the feeling, beeing an ever lasting newbie myself. Vb is nice and has it's place but the combination of PB and firefly can get you to levels you never thought were possible.
I like the feel of Firefly, it is the closest of all the Visual Designers to my coding style, comfort with the Designer is of paramount importance to me. The problem is there always seems to be lots of little glitches that turn out to be a real big problem later on in PB no matter what Visual Designer you use. Which leaves the user to make an attempt to find the source of the problem let alone to implement a solution. Unfamiliararity breeds frustration. And I've been trying to get the data entry portion of my app to work now for the last seven weeks (yes count them,
7 weeks!!!) and I'm really no further along than when I started this little venture due to all of these hidden "features" in Designers, controls, etc. So you can imagine my frustration at this point. I know there is a rather painful learning curve to Widnows, but c'mon, I'd rather calculate tangent offsets to a cubic spline than deal with this Windows crap. The PB purist always derides VB for hiding too much of the underlying Windows architecture from the user, but when you have supervisor breathing down your neck to get things done ease of use and
productivity is always welcome.
But I'm still willing to invest some time in PB and Firefly in order to learn it. Now if Paul would only implement a feature in Firefly to do what I want it to do and not what I told it to do... :D
Jean,
My SIGRID.inc file shows 3 arguments for the siSetRowheight() function at this location. :(
Hang in there Jean ;)
By the way, my SiGrid.inc file shows
DECLARE FUNCTION siSetRowHeight LIB "SIGRID.DLL" ALIAS "SETROWHEIGHT" (BYVAL hWnd AS LONG, BYVAL RowHeight AS LONG, BYVAL Row AS LONG, OPTIONAL BYVAL ResizeEdit AS LONG) AS LONG
The inc file dates from 5/3/2005
Marc
Later....
I have firefly 1.11 still on my pc and it does indeed show something different. The 4the parameter is not present there.
Sorry to hear about your struggles. I also came from a VB background so I can appreciate the learning curve needed. However, I know that I would never go back to VB now that I have learned so much about Win32. Using controls can be easier in VB, but you are shielded way too much from the low level aspects of the controls that it can inhibit your ability to do things when the time comes that you need to implement a feature that VB does not expose automatically for you.
SIGRID: I don't use SIGrid very much. The version that I ship with FireFly is version 3.2 (click on the "About" property for your control to see what version you are using). You may want to get the latest version from Chris Bristow if you do not already have it.
Problem 1: I could not duplicate it here... The edit box scrolls when the number of characters entered exceeds the width of the column.
Problem 2: I don't know why your RTCLICK is not firing. I couldn't get it to work either. I only get the standard textbox right click popup menu to appear. We could try subclassing the edit textbox and catching the message but I think Chris Bristow would have a better solution via modifying his code.
If we can get Chris Bristow in on this conversation then I'm sure that we can get your application fixed in no time. :)
Paul,
Just reinstalled Firefly using a separate directory other than \JellyFish Pro and that seemed to clear up Problem 4. My SIGRID file reads 4 arguments like it's supposed to. :D
You seem to be using 3.2 of SIGRID inside of Firefly, but I could only get 3.1 from Chris' web site, which I am sure is part of the problem.
The RTCLICK message fires, but only if the text cursor is NOT inside the grid cell for editing. I would agree that Chris should probably add a new message, something like CELL_RTCLICK, to his code. Unfortunately, he doesn't seem to be answering his e-mail right now, so I don't hold out much hope for a response, hope everything is all right with Chris.
Quote
Using controls can be easier in VB, but you are shielded way too much from the low level aspects of the controls that it can inhibit your ability to do things when the time comes that you need to implement a feature that VB does not expose automatically for you.
Yes, I like the idea of gaining control of Windows
when I have to which is not very often. What I'm trying to do here is relatively straightforeward, simple data entry, nothing really complicated and things ain't working like they're supposed to. But right now what it all boils down to is a question of productivity. I'm sure you'll agree starting out learning Win32 one is not very productive (Firefly helps out a lot though).
Assuming we do have to subclass the SIGRID control where does the code go? In the SIGRID_CUSTOM code? And what special code is needed to trap the %WM_RBUTTONDOWN/UP messages? Something like:
SELECT CASE wMsg
CASE %WM_RBUTTONUP
'Do something here
CASE ELSE
END SELECT
Which in my Olympian ignorance is all I can think of, or is something else needed?
I have tried to subclass the edit control in the SIGrid but it keeps generating a GPF when I run my example. The subclass should allow me to capture the right click menu, however, I expect that SIGrid is also subclassing the edit control and my attempt to subclass it is somehow causing things to explode.
Hmmmm, it appears there is more going on (or maybe not) with SIgrid than meets the eye.
I also found out what apparently causes the truncation of text within a cell. It has to do with the header formatting string. If you specify ALL of the possible parameters for this string from the Designer like:
"ColumnLabel:Width:HeaderAlignment:ColumnType:ColumnAlignment"
for example:
"Field 1:90:^::^"
SIgrid truncates the text to the length of the header text. Now one other possibility that could also affect cell editing is the fact that the column type has been defaulted in the format string, however, the SIgrid docs do not specify what to use for a normal column type so it is really anybody's guess as to what this value is supposed to be. So maybe truncation could occur from a combination of things. Oh, well...:(
OTOH, if you define the format string like:
"ColumnLabel:Width:HeaderAlignment"
or
"Field 1:90:^"
then truncation does not occur.
Thanks for your efforts on my behalf. Since Sigrid is too "quirky" to use in a consistent manner I guess I'll have to try something else.
You may want to try Elias' EGrid32 to see if it is easier to use for your application:
http://www.sweetheartgames.com/egrid32pro/Index.html
... Looks like you are already signed up at Elias' forum so you know about EGrid... :)
Yes, I'm trying to cover all the bases.
Been working with EGRID this evening, so far things appear to work as advertised.