Dialog Box Addfield

I am writing code for creating a dialog box. While adding the field to dialog box by using the Dialog.AddField() method, How to specify the value instead of using any EDT(by TypeId) directly. Please let me …

First you need to add dialog field to the dialog(what type it is) - and then you can assign value to it.

DialogField dialogSiteId;

DialogRunbase dialog;

InventSiteId siteId;


dialogSiteId = dialog.addFieldValue(TypeId(InventSiteId),siteId);


Thanks Kranthi for your reply,

Hope you have understood my requirement differently.

I want to write my code as

dialogsiteId = dialogfield.addField(xxx,“Score”);

In place of xxx , i dont have a edt xxx defined to specify as

dialogsiteId = dialogfield.addField(TypeId(xxx),“Score”);

, and my variable is score of int type. so how to specify withot typeId(), in Addfield.

finally my requirement is in my dialog box i should get a score field which accepts integer value.and value is specified by me when the dialog is run’d.

ok - then use the below code

dialogInt = dialog.addFieldValue(Types::Integer,number,“Score”);

Thanks kranthi.

its working fine…

I tried to use the same as Type::Real, Identifying th enum “types” made me difficult.

Thanks Again

is there any way to use WinAPI::browseForFolderDialog() in dialog?