| View previous topic :: View next topic |
| Author |
Message |
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Tue Aug 25, 2009 5:45 pm Post subject: Combo box + save style |
|
|
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 25, 2009 6:50 pm Post subject: |
|
|
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 |
|
 |
dangt Newbie
Joined: 19 May 2009 Posts: 20
|
Posted: Tue Aug 25, 2009 6:52 pm Post subject: |
|
|
ic
Thanks DS |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Aug 25, 2009 6:54 pm Post subject: |
|
|
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 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  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Aug 26, 2009 9:55 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|