forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


pull down menus help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 12:51 am    Post subject: pull down menus help Reply with quote

hello all

I don't understand the pull down menu what i'am trying to do is make it so people can edit the name in it..meaning for buttons i can make it do that like this :

Code:


INIFILE OPEN,%%var0\%%inifile
  %%button1 = @INIREAD(test,button1)


DIALOG ADD,BUTTON,r6,126,18,66,24,%%button1, Click here to start %%button1


:r6button
%%file3 = %%path6
info %%path6
if @file(%%file3)
run %%path6
else
info folder can't have spaces in it OR you renamed exe file!!!!!
end
  goto evloop





how do i can pull down menus to work like this?

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 2:12 am    Post subject: Reply with quote

i have this much firgure out BUT how do i make it so it will goto to a fuction when you selected from the list? like you do with a button?


Code:

 %%test = me
    DIALOG SETPOS,,,,,@sum(288,@dlgpos(stat,H))
  LIST ADD,COMBO,%%test
  LIST ADD,COMBO,what ever1
  LIST ADD,COMBO,what ever2
  LIST SEEK,COMBO,0
  %P = @sendmsg(~lst,1045,1000,0)
   %T = 1



thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Apr 29, 2004 11:25 am    Post subject: Reply with quote

hi tim,

to answer your first post...if i understand correctly...you can use the same idea of reading from an ini file what you want to use in the menu, and then use LIST ADD, MENU, %%HEADER1, %%ITEM1,%%ITEM2,... i think this would work...would then :%%HEADER1MENU work (to process the menu event)?

for the second post, i think you just use the styles LIST, CLICK and then when an item in, say COMBO1, is clicked...it will take you to :COMBO1CLICK

i think that this what you are after Confused

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 2:22 pm    Post subject: Reply with quote

ok i think i got the first part to work with the ini but the :combo1click label is not working right Sad
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 2:30 pm    Post subject: Reply with quote

here is a short version of what i'am trying to do:

i can't get the labels to work right

Code:


%%program name1 = notepad

%%path1 = c:\windows\notepad.exe


%%program name2 = wordpad

%%path2 = c:\windows\wordpad.exe

%%program name3 = aol

%%path3 = c:\windows\aol.exe

    DIALOG SETPOS,,,,,@sum(288,@dlgpos(stat,H))
  LIST ADD,COMBO,%%program name1
  LIST ADD,COMBO,%%program name2
  LIST ADD,COMBO,%%program name3
  LIST SEEK,COMBO,0
  %P = @sendmsg(~lst,1045,1000,0)
   %T = 1


:combo1click

run %%path1

:combo2click

run %%path2

:combo3click

run %%path3


_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Apr 29, 2004 8:03 pm    Post subject: Reply with quote

1. Your combo lists must have the CLICK style to generate
a click event - something like this:

DIALOG ADD,COMBO,Combo1,4,4,100,24,,,CLICK

2. Your label names must match the combo names, with
CLICK appended. So if your combo is named with a var
containing "notepad" the label must be:

:notepadCLICK

3. You cannot use vars in a label name to match the ones
you load from your ini file. For example, this does NOT
work:

:%%varCLICK

4. Your var names cannot have a space in them, so use
something like:

%%program_name1

Hope this helps... Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 8:46 pm    Post subject: Reply with quote

i see what you are saying is there any way to have a var name work as a label? cuase i was hoping to uses a var so the user can edit the names if ya follow what i mean
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 8:58 pm    Post subject: Reply with quote

or how do i make it so if a item is selected in a list it will run that item meaning this

Code:


DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 4/29/04 - 15:33 ***
  DIALOG ADD,COMBO,COMBO1,40,40,176,21,,,click
  LIST ADD,COMBO1,notepad
  LIST ADD,COMBO1, aol
  LIST ADD,COMBO1, wordpad
  LIST SEEK,COMBO1,0

  DIALOG SHOW
 
  :loop
wait event
goto @event()


:combo1Click

if aol is selected run aol

if notepad is selected run notepad

if wordpad is selected run wordpad

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Apr 29, 2004 8:59 pm    Post subject: Reply with quote

tim6389 wrote:
i see what you are saying is there any way to have a var name work as a label? cuase i was hoping to uses a var so the user can edit the names if ya follow what i mean


Nope. But why does the combo name need to be different?
The user doesn't see that anyway. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Apr 29, 2004 9:10 pm    Post subject: Reply with quote

tim6389 wrote:
or how do i make it so if a item is selected in a list it will run that item


OK, here ya go. The only thing is - if the app is not in Window's
path, you'll need the complete path/filename in the list.
For example:

LIST ADD, Combo1, "c:\windows\notepad.exe"

Otherwise, this should work. Wink
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,200,100
  DIALOG ADD,COMBO,Combo1,4,4,192,24,,,LIST,CLICK
DIALOG SHOW

LIST ADD, Combo1, "notepad"
LIST ADD, Combo1, "wordpad"

:EVLOOP
  WAIT EVENT
  goto @event()

:Combo1CLICK
  RUN @item(Combo1)
  goto EVLOOP

:CLOSE
  EXIT

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 9:18 pm    Post subject: Reply with quote

ahhh so i will have to have a path in the list to....i was hoping to have just the name in the list and have the path listed where the user won't see it in the list.....if ya follow what i mean...


i would keep my button way but i don't like the layout so i thought this pull down menu would look cleaner.....

thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Apr 29, 2004 9:32 pm    Post subject: Reply with quote

Ya can use list a with the path/filenames, and only the name
in the combo. Make sure the items are added in order. Wink
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,200,100
  DIALOG ADD,COMBO,Combo1,4,4,192,24,,,LIST,CLICK
DIALOG SHOW

LIST CREATE, 1

LIST ADD, Combo1, "Notepad"
LIST ADD, 1, "c:\windows\notepad.exe"

LIST ADD, Combo1, "Wordpad"
LIST ADD, 1, "c:\windows\wordpad.exe"

:EVLOOP
  WAIT EVENT
  goto @event()

:Combo1CLICK
  RUN @item(1, @index(Combo1))
  goto EVLOOP

:CLOSE
  EXIT

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 9:51 pm    Post subject: Reply with quote

so i could uses a var for the path then have the ini file read it that would work right?

if ya follow what i mean

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Apr 29, 2004 10:07 pm    Post subject: Reply with quote

If ya mean have the path/filename in the ini file, read
it to a var, then add it to the list or combo - yes, you
can do that.

Ya can have separate ini file entries with the name
for the combo and the path\filename for list 1, or
use @name() to get the appname from path\filename.

OR... ya could save the path/filenames to a text file
and load that file into list 1, then use loop thru with
@name() to get the app names to put in the combo. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Apr 29, 2004 10:09 pm    Post subject: Reply with quote

cool


thanks when i get home i will play with it Smile


thanks again

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group