View previous topic :: View next topic |
Author |
Message |
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Feb 02, 2005 8:11 pm Post subject: |
|
|
This is a little xp-menu-element I created today. You need the vdsbrw50 dll for it to run...
Screenshot:
http://forum.vdsworld.com/download.php?id=58
Reference:
Code: |
# Commands:
#
# - xp-menu add,menu,<menuname>,<image file>
# This command will create a clickable menu header
# which is needed before you can add items to the
# menu.
# - xp-menu add,item,<itemname>,<image file>
# With this command, you can add items to the last
# created menu. When an item is clicked, an event
# will occur.
# - xp-menu create,<name>,<top>,<left>,<width>,<hight>,<menu to auto-open>,{<cursor>}
# This will create the menu and display it at the
# specified location. The <menu to auto-open>
# parameter can contain the name of a menu which
# will automaticly expand. You can use these
# values for the <cursor> parameter:
# - default, hand, move, text, crosshair, wait, help,
# e-resize, n-resize, s-resize, w-resize, ne-resize,
# nw-resize, se-resize, sw-resize
# If you don't specify a <cursor> parameter, "default"
# will be used.
# - xp-menu open,<name>,<menu>
# You can use this function to open a menu.
# - xp-menu close,<name>,<menu>
# You can use this function to close a menu.
#
# Functions:
#
# - @xp-menu(item,<name>)
# This function will return the last item click
# when a <name>Navigate event occurs.
# - @xp-menu(menu,<name>)
# This function will return the name of the
# opened menu.
#
# Events:
#
# - <name>Navigate
# This event will trigger when somebody clicks
# a menu item. |
Description: |
A screenshot of the element |
|
Filesize: |
21.22 KB |
Viewed: |
34802 Time(s) |
|
Description: |
|
Download |
Filename: |
xp-menu.zip |
Filesize: |
47.65 KB |
Downloaded: |
1735 Time(s) |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Last edited by Skit3000 on Sat Feb 05, 2005 3:54 pm; edited 2 times in total |
|
Back to top |
|
|
bbelcher Contributor
Joined: 30 Jul 2002 Posts: 172
|
Posted: Wed Feb 02, 2005 8:44 pm Post subject: |
|
|
Very Nice Skit.
|
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Feb 03, 2005 12:52 am Post subject: |
|
|
looks great skit
serge
_________________
|
|
Back to top |
|
|
jwfv Valued Contributor
Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 03, 2005 2:26 am Post subject: |
|
|
Very cool! That is what I was thinking when I was asking about good uses of the browser element.
Skit, did you produce that using DHTML? Regular HTML? Or some other way?
_________________ Joe Floyd |
|
Back to top |
|
|
jwfv Valued Contributor
Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 03, 2005 2:31 am Post subject: |
|
|
Just noticed that you included the source code for the .dsu.
I will check it out - maybe I need to learn some javascript or vbscript...
_________________ Joe Floyd |
|
Back to top |
|
|
JRoza Contributor
Joined: 17 Aug 2003 Posts: 182 Location: Netherlands
|
Posted: Thu Feb 03, 2005 7:08 am Post subject: |
|
|
Very nice indeed!
I'm sure this dsu will find many uses in my future programs.
Another job wel done Skit!
|
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Thu Feb 03, 2005 10:00 am Post subject: |
|
|
Wow, that is awesome!
I've just modified it so that the GIF graphics can be compiled into the executable. I have changed two lines and commented out the old ones so you can see the changes I needed to make. I also had to rename some of the graphics so that the filenames fitted within VDS 5's resource name limit of 8 characters, add #resource directives to add the resources to the executable, and add a line to change the directory to the program directory to ensure that the path to the executable is always correct.
In this form, the example will only show the graphics when run in the IDE if an EXE containing the compiled resources exists. I've attached a Zip with my modified version, including a compiled executable.
Description: |
Skit's menu example, modified to use compiled-in respurces |
|
Download |
Filename: |
xp-menu2.zip |
Filesize: |
39.08 KB |
Downloaded: |
1785 Time(s) |
_________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
marty Professional Member
Joined: 10 May 2001 Posts: 789
|
Posted: Thu Feb 03, 2005 12:07 pm Post subject: |
|
|
Impressive Skit! Thanks!
Excellent work!
Will certainly use this in my next project
Thank to Jules also for the update...
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Feb 03, 2005 3:08 pm Post subject: |
|
|
jwfv wrote: | Just noticed that you included the source code for the .dsu.
I will check it out - maybe I need to learn some javascript or vbscript... |
I just got an example script of the internet, and adjusted it so that all the lines which are needed where generated by the VDS script itself...
Does anybody have suggestions for other HTML-element which can be useful for VDS?
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
jwfv Valued Contributor
Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 03, 2005 4:03 pm Post subject: |
|
|
Here are some great element ideas:
http://www.blueshoes.net/en/javascript/
Browse through the examples of each component. (Look for the live examples of each.) I was impressed by the variety that they have. It may give someone an idea of coming up with a way to do these things in VDS.
One more question: Is it possible to get rid of the "hand" cursor in the browser control? I would rather have the arrow cursor so it doesn't have a "web page" feel.
_________________ Joe Floyd |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Feb 03, 2005 5:14 pm Post subject: |
|
|
jwfv wrote: | One more question: Is it possible to get rid of the "hand" cursor in the browser control? I would rather have the arrow cursor so it doesn't have a "web page" feel. |
You can open the xp-menu.dsc file and do a search-and-replace to change the word "hand" into "default" (without quotes)...
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Feb 04, 2005 3:08 am Post subject: |
|
|
Skit,
Excelent work... Just wanted to throw my 2cents in. See the code below. It should fix the URL encoded hex characters for the space characters and such.
Code: |
if @equal(%1,"ITEM")
# When the user clicks an item, you can get that
# item by calling the @xp-menu(item,<elementname>)
# function. Be aware that if you have menu items
# which use special HTML characters like a space,
# you will get their HEX code in return, like %20.
# Issue above is resolved with this while loop.
%%EventID = @browser(%2,navURL)
While @Greater(@Pos("%",%%EventID),0)
%%HexPos = @Pos("%",%%EventID)
%%Ascii = @Chr(@Sum($@StrDel(@SubStr(%%EventID,%%HexPos,@Sum(%%HexPos,2)),1),0))
%%EventID = @StrDel(%%EventID,%%HexPos,@Sum(%%HexPos,2))
%%EventID = @StrIns(%%EventID,%%HexPos,%%Ascii)
Wend
exit %%EventID
end
|
_________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Feb 04, 2005 3:10 am Post subject: |
|
|
Oops,
Just noticed that I have made 666 posts. I think I need to post once more to change that
_________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
|