S stevenindon Active Member Licensed User Nov 25, 2021 #1 Hello all, I have created a custom view with some custom properties as listed as such: #DesignerProperty: Key: StringExample, DisplayName: Title Text, FieldType: String, DefaultValue: Text How can i access the value of the properties (Title Text) in my customview? dim Label1 as label Label1.initialize Label1.text=mbase.StringExample <--------- ? Thanks
Hello all, I have created a custom view with some custom properties as listed as such: #DesignerProperty: Key: StringExample, DisplayName: Title Text, FieldType: String, DefaultValue: Text How can i access the value of the properties (Title Text) in my customview? dim Label1 as label Label1.initialize Label1.text=mbase.StringExample <--------- ? Thanks
Alexander Stolte Expert Licensed User Longtime User Nov 25, 2021 #2 In the "DesignerCreateView" sub is a "Props" parameter. Make a modul variable e.g. mStringExample as String and then do this: B4X: mStringExample = Props.Get("StringExample") 'or Label1.Text = Props.Get("StringExample") Upvote 1
In the "DesignerCreateView" sub is a "Props" parameter. Make a modul variable e.g. mStringExample as String and then do this: B4X: mStringExample = Props.Get("StringExample") 'or Label1.Text = Props.Get("StringExample")
klaus Expert Licensed User Longtime User Nov 25, 2021 #3 You may have a look at the B4X Custom Views booklet. It covers all these aspects. Upvote 0
S stevenindon Active Member Licensed User Nov 25, 2021 #4 Thank you Alexander. Just worked! Thanks Upvote 0