Re: Another VEL question.
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Oct 27, 1999
- 562 views
Hello, >From: Ad Rienks <kwibus at ZONNET.NL> > >Rather then an UpDownButton, I would use a ComboBox here, set the >ComboStyle to DropDownList, and fill the Combo with the predefined choices. >Gary told me to use APPENDITEM, a method not well documented in >Experimental.doc. > <Snip Code> > >Hope this helps, Ad Rienks >> Van: Naflign > > I've got a quick question for anyone who's had any experience with VEL. >I'm working on the editor for race creation in a little rpg I'm working on, >and what I'd hoped to do was have an updown button, which when pushed up or >down would display the next race in the race string. So, the string being >loaded as race, and the value as > > I'd set up the updown button and edit as > > RaceUpDown1 = CreateControl(UPDOWNBUTTON,RaceForm) > s = { {ASSOCIATE,RaceNumberEdit}, > {MAX, 100}, > {MIN,1}, > {INCREMENT,1}, > {ARROWKEYS, TRUE}} > SetAttribute(RaceUpDown1,s) > > RaceEdit1 = CreateControl(EDIT,RaceForm) > s = { {TEXT, race[ GetAttribute(RaceUpDown1, POSITION) ] }, > {TOP, 20}, > {LEFT, 250}, > {HEIGHT,10}, > {WIDTH,150}, > {MAXLENGTH, 20}, > {TABORDER, 1}, > {TABSTOP, TRUE}, > {HINT, "Write the name of your race here."}, > {SHOWHINT, TRUE}} > SetAttribute(RaceEdit1,s) > > The button though, is allways reading as being 0. Am I phrasing this >incorectly? > > Thanks in advance for any help, for anyone able to make some sence of my >sleepy ramblings > What Ad wrote is probably what you want to do but in case there is some reason you really need to use UPDOWN buttons then here's my suggestion: You need to have "RaceNumberEdit" already set as a textbox or something before associating the updown with it. It can be an invisible text box if you want but the associate property needs a control. If you've got that then the text of 'RaceNumberEdit' should update whenever you click on the updown button. If it doesn't then I don't know what the problem is. Lastly you must set an event procedure for the change event of RaceNumberEdit so that RaceEdit1 is updated with the race name determined by the value in RaceNumberEdit. If it doesn't work then download the latest bleeding edge version of VEL. later, Lewis Townsend ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com