Jump to content

Gridbuff

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Many thanks for that, Miguel. Just what I was needing to get started. Much appreciated:-) The user manuals seem to be ok on examples of standalone boxes, but one that actually works in practice is quite another matter. This gives me what I need to get going on a box for multiple inputs, when I'm scripting windows, spiral staircases etc. The old custom boxes work fine in VW2013, but i'll have to upgrade sooner or later. Again many thanks for your help. Gridbuff
  2. Thanks Larry. I'll keep that in mind.
  3. {I have done plenty of classic custom dialog boxes. I like the procedures and I'm comfortable with screen co-ordinates . However because these procedures have all been scrapped, I'm now trying to write a simple example script showing a custom modern dialog into which real values a & b are entered in order to draw a rectangle (See below). Once I've got this right, I can go on to do scripts for complex objects with many variables} Procedure DialogTest; Procedure SetUpDialog; VAR a,b:REAL; ID: LONGINT; Res:LONGINT; BEGIN ID:=CreateLayout('Parameters', False, 'OK', 'Cancel'); {Text fields} CreateStaticText( ID, 05, 'Value-a', 15); CreateStaticText( ID, 06, 'Value-b', 15); {Box fields} CreateEditReal( ID, 15, 1, 1.25, 10); CreateEditReal( ID, 16, 1, 2.64, 10); {Text layout} SetFirstLayoutItem( ID, 05); SetBelowItem( ID, 05, 06, 0, 0); {Box layout} SetRightItem( ID, 05, 15, 0, 0); SetRightItem( ID, 06, 16, 0, 0); Res:=RunLayoutDialog( ID, NIL); END; BEGIN SetUpDialog; {I now need to assign the field values entered for Value-a & Value-b to the declared variables a & b. The obvious step would be - a:=GetEditReal(ID, 15, 1, true); b:=GetEditReal(ID, 16, 1, true); rect(0, 0, a, b); END; Run(DialogTest); Dead simple and similar to the sort of script in version 2008. However this does not work, and I have tried numerous workarounds with no success. QUESTION: How do I put in this missing link? Any constructive advice most welcome!}
×
×
  • Create New...