Assembly Posted November 15, 2010 Share Posted November 15, 2010 In a recent post there was discussion about how VS can't do dynamic pop ups. Below is a procedure that can be used to build a list of values to add to a dialog multi select. How I used this. Create an Event enabled PIO with a button. The button activates the dialog. The dialog builds a dynamic selector. The dialog sets a vlaue. I wrote this code last night and am still working on the tool, If you want to try it you can: Include the pastebin code into a PIO with three parameters Keynote Index TextScale It is simple Keynote tool. It looks for other keynote value in the file to aid making note tags consistent. Pastebin with code PROCEDURE AddParameterAsChoices(ListConstant:INTEGER;RecName:STRING;FieldName:STRING); VAR Notes: DYNARRAY[] of String; ObjectName:STRING; hObj:HANDLE; hTemp:HANDLE; hNotNeeded:Handle; Icount:INTEGER; iTemp:INTEGER; iList:INTEGER; BEGIN; DSelectAll; SelectObj(INSYMBOL & INVIEWPORT & (R IN [RecName])); hTemp:=FSActLayer; iTemp:=0; While hTemp<>NIL DO BEGIN iTemp:=iTemp+1; hTemp:=NextSObj(htemp); END; ALLOCATE Notes[0..iTemp]; hTemp:=FSActLayer; Itemp:=0; While hTemp<>NIL DO BEGIN Notes[iTemp]:=GetRField(hTemp,RecName,FieldName); iTemp:=iTemp+1; hTemp:=NextSObj(htemp); END; iCount:=iTemp; SortArray(Notes,iCount,1); iLIst:=0; For iTemp:=0 to iCount-1 DO BEGIN If Notes[iTemp]<>Notes[iTemp+1] THEN BEGIN InsertChoice(ListConstant, iList, Notes[iTemp]); IF GetRField(hObject,RecName,FieldName)=Notes[iTemp] THEN SelChoice(ListConstant, iList, True); iList:=iList+1; END; END; END; 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.