WhoCanDo Posted October 3, 2008 Share Posted October 3, 2008 I've search this forum and could not find any postings for AddChoiceItem I have created a dialog box and used AddChoiceItem('Standard Angle',4,1,120,12,300,28); which works well but I can't get AddChoiceItem populated. Help suggests using InsertChoice(3,1,'30 x 30 x 5'); but I get a VW error "dialog not found" Any suggestions would be appreciated. Quote Link to comment
Miguel Barrera Posted October 3, 2008 Share Posted October 3, 2008 The ItemID has to be the same on both procedure calls. The itemID is assigned by you for each control in the dialog. PROCEDURE AddChoiceItem(choiceTitle :STRING; itemID, choiceType, x1, y1, x2, y2 :INTEGER); PROCEDURE InsertChoice(itemID, before :INTEGER; choice :STRING); I also noticed that AddChoiceItem does not have a dialog ID to associate with the dialog and consequently, that may be the reason for the error. If you want a pulldown menu use: PROCEDURE CreatePullDownMenu(dialogID, itemID, widthInCharacters :LONGINT; ); You can find custom dialog examples at this site: Vectorscript examples Quote Link to comment
WhoCanDo Posted October 7, 2008 Author Share Posted October 7, 2008 I've got it ! The InsertChoice populates the AddChoiceItem list after the dialog is open. Here's the basics ..... BeginDialog(1,..... AddChoiceItem(What the hell,4,...... EndDialog; GetDialog(1); InsertChoice(4,LineNo,Text); repeat DialogEvent(Item); case (Item) of 1 : {OK} GetSelChoice(4,0,...... etc. "What the hell" is the "Choice Title" but does not appear to be used for anything except testing your typing skills. Hope this helps other searches in the future. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.