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 


Combo box + save style

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Tue Aug 25, 2009 5:45 pm    Post subject: Combo box + save style Reply with quote

How do I use the combo box save style? I want to save to an INI file.
Do I have to use this inconjuction with Click style?

SAVE <name> [VDS6] The element will automatically save and restore the last value it contains in the default registry location, or in an INI file if one is being used. If <name> is not specified then the name of the dialog element will be used for the name of the registry or INI file value.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Aug 25, 2009 6:50 pm    Post subject: Reply with quote

I know the help file for VDS does not tell you however this is how you do this.

Code:

Title Combo_savestyle
# you can open any INI file but make sure you specify the path to the file
# Also note it must come before the dialog.
INIFILE OPEN,@PATH(%0)Combo_savestyle.ini
# build your dialog with the controls that can save their states.
  DIALOG CREATE,New Dialog,-1,0,350,166
REM *** Modified by Dialog Designer on 8/25/2009 - 14:33 ***
  DIALOG ADD,COMBO,COMBO1,31,49,,,item1,,SAVE comboitem
  DIALOG SHOW
  List add,combo1,item1
  list add,combo1,item2
  list add,combo1,item3
  list add,combo1,item4
:Evloop
  wait event
  goto @event()
:Close
  info Replace this line with code to be executed before the dialog closes
  # Make sure you close the INI file when your program closes
  INIFILE CLOSE
  exit

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
dangt
Newbie


Joined: 19 May 2009
Posts: 20

PostPosted: Tue Aug 25, 2009 6:52 pm    Post subject: Reply with quote

ic

Thanks DS
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Aug 25, 2009 6:54 pm    Post subject: Reply with quote

Also note that VDS can only have 1 INI file open at a time using the INIFILE/@INIFILE() commands/functions. One more thing.. They did not make it possible to save the state of the controls to an XML file Question The VDS 6 INIFILE command has the ability to use XML files as if they are INI files but it does not work in this case Rolling Eyes
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Wed Aug 26, 2009 9:55 am    Post subject: Reply with quote

The only problem with specifying a ini file value's name when using the save style is that the next time you use the dialog designer it removes the save style! I prefer to just let VDS use the element's name in the ini file.

Code:
  DIALOG ADD,COMBO,COMBO1,31,49,,,item1,,SAVE

_________________
cheers

Dave
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
Page 1 of 1

 
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