Source language: Translate to:

hpwGrid

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Postby Gaev » Sun Nov 13, 2005 7:38 pm

Steven:
are there any event subroutines that can get fired off from the grid.

For example
- column or row change
- doulbe click on header column
-mouse moves to another row.
As I am currently working with this plug-in ... I can answer this while Hans-Peter sleeps ... say you were going to create a grid associated with rectangle called "animGrid" ... you would set up the following variables BEFORE issuing the hpwGridCreate command
Code: Select all
SetVar "[animGrid_SelAction]" "GoSub [#34]animGridSel[#34]"
SetVar "[animGrid_EditAction]" "GoSub [#34]animGridEdit[#34]"
SetVar "[animGrid_InputAction]" "GoSub [#34]animGridInput[#34]"
SetVar "[animGrid_MouseOverAction]" "GoSub [#34]animGridMouseOver[#34]"
SetVar "[animGrid_RClickAction]" "GoSub [#34]animGridRClick[#34]"
hpwGridCreate "animGrid"
... you can populate the variables with more than one inline command ... but I find the [#xx] stuff too inconvenient ... so I just name a subroutine for each call back ... note that you can leave the variable null if you do not need a particular call back trigger.

*_MouseOverAction routine will get triggered when your mouse pointer moves over any of the cells ... where you can examine contents of variables [*_MouseOverCol], [*_MouseOverRow] and [*_MouseOverValue] ... where * is name of rectangle object.

*_SelAction routine will get triggered when you navigate to another cell ... where you can examine contents of variables [*_SelCol], [*_SelRow] and [*_SelValue] ... where * is name of rectangle object.


Double Clicking on Header Column will resize column to value specified in

SetVar "[hpwGridDefaultColWidth]" "80"

... BEFORE invoking hpwGridCreate


Take a look at the included sample ... I got most of this from looking at the code and then running it.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby HPW » Mon Nov 14, 2005 12:02 am

Double Clicking on Header Column will resize column to value specified in

SetVar "[hpwGridDefaultColWidth]" "80"

... BEFORE invoking hpwGridCreate


True when content is smaller than [hpwGridDefaultColWidth], otherwise it makes an autosize on the column to fit all text in the column.

- column or row change


What does this mean?
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Tue Nov 15, 2005 11:51 am

Just released hpwGrid 1.04:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

Variable: [RectangleName_ColCount]
Variable: [RectangleName_RowCount]
Action-Variable: [RectangleName_KeyDownAction] - neobook-ActionScript
Variable: [RectangleName_KeyDownShift] - 0/1
Variable: [RectangleName_KeyDownAlt] - 0/1
Variable: [RectangleName_KeyDownCtrl] - 0/1
Variable: [RectangleName_KeyDownKey] - Key (Code with CTRL)
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sat Nov 19, 2005 12:57 pm

Just released hpwGrid 1.05:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

New Variable: [hpwGridRowSelect] - enable/disable complete row-selection
Variable: [hpwGridColSizing] - Disables also Header-Double-Click autoresizing of column
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sun Nov 20, 2005 1:53 am

Just released hpwGrid 1.06:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

New hpwGrid.ini - Editable command descriptions for user driven improvments/translations.
Added Directcall-interface (incl.newLISP)

Details on Directcall here:
http://www.neosoftware.com/forum/viewtopic.php?t=12368
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby dglojnar » Mon Nov 21, 2005 12:43 am

hpw, how can I save or load content of grid - as delimiter text file?

If is deflimiter text file, what delimiter - TAB, ; or something else?

Regards,
dglojnar
dglojnar
 
Posts: 112
Joined: Sun Apr 03, 2005 10:52 pm

Postby HPW » Mon Nov 21, 2005 1:19 am

This both commands can be used for this:

hpwGridTable "hpwGrid2" "col" "row" "|" "[inputvar]"
hpwGridGetTable "hpwGrid2" "col" "row" "col2" "row2" "|" "[outputvar]"

The '|' is the delimiter. You can choose a different one.
Then you have your data in [outputvar].
From their you can write it to file with neobook commands.
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby dglojnar » Mon Nov 21, 2005 1:22 am

Thank You for quick response :D

Regards,
dglojnar
dglojnar
 
Posts: 112
Joined: Sun Apr 03, 2005 10:52 pm

Postby cp4w » Mon Nov 21, 2005 9:55 am

I am very happy in seeing how hpwGrid is taking shape.

Thanks HPW and also thanks Gaev.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby Gaev » Mon Nov 21, 2005 10:08 am

Steven:

Ideas/Suggestions :idea: :idea: :idea: are a dime a dozen ... I am just the kid in the candy store ... its uberDeveloper Hans 8) who makes it all happen.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby HPW » Mon Nov 21, 2005 1:33 pm

Just released hpwGrid 1.07:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

Driven by user-feedback from uberNeobooker Gaev:

Variable: [RectangleName_DblClickAction] - Actionstring on DoubleLeftClick
No more hardcoded Column-Autosize (Can be done via the script now)

Variable. [RectangleName_LClickCol]
Variable. [RectangleName_LClickRow]
Variable. [RectangleName_LClickValue]
Variable. [RectangleName_LClickX]
Variable. [RectangleName_LClickY]

(All LClick variables have their pendant in RClick)
(X/Y can be used to open context menu at cursor positions.)
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sun Nov 27, 2005 2:28 am

Just released hpwGrid 1.08:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

Fix: [RectangleName_DblClickAction] is no more triggered outside cell-area.
(Thanks to Gaev for error-report)

Distribution and demo-pub now contains a basic documentation (RTF).
(Thanks to Gaev for making/providing!)
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sun Nov 27, 2005 1:01 pm

Just released hpwGrid 1.09:

http://www.hpwsoft.de/anmeldung/html1/n ... ook18.html

Action: hpwGridSetEditMode - Set editmode of a Grid-Control ON/OFF (0/1).

With this action you are able to use the OnSelect-Action to define cols,rows or cells as editable/noneditable.
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Odd » Thu Dec 01, 2005 3:48 am

Thank you for this interesting plug-in, hp!

I'm hoping to implement it in my game Spell-IT, to edit dialog texts. I'm trying to open the grid rectangle in a custom window, but then it disappears. Would you consider to make it visible even in a custom window? Otherwise, I can't use it. The grid has to have exclusive focus on the page.

By the look of your upgrading history, I thank you in advance... :wink:
User avatar
Odd
 
Posts: 81
Joined: Sat Apr 02, 2005 3:34 am
Location: Norway

Postby HPW » Thu Dec 01, 2005 4:18 am

Odd,

There should be no reason, that it does not work in a custom window.
Of course I had not test this, so it might be some other problem.
I will have a look at it.

Later: Do you create it inside the custom window code? I recall some problems with other plugins where people create the plugin first and then create the custom window. That does not work. Put the rectangle in the custom window and then when it has opened create the plugin.

Hans-Peter
Hans-Peter
User avatar
HPW
 
Posts: 2521
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

PreviousNext

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 3 guests

cron