saeed10051 Active Member Licensed User Longtime User Jun 22, 2020 #1 I am trying to load Swiftbutton at run time similar to a normal button. There i am required to initialize my swiftbutton but there are two parameters that need to be specified when initializing swiftbutton i.e. callback as object and event name as string. Is there a working example of loading xui controls at runtime.
I am trying to load Swiftbutton at run time similar to a normal button. There i am required to initialize my swiftbutton but there are two parameters that need to be specified when initializing swiftbutton i.e. callback as object and event name as string. Is there a working example of loading xui controls at runtime.
LucaMs Expert Licensed User Longtime User Jun 22, 2020 #2 https://www.b4x.com/android/forum/threads/b4xswitch-in-runtime-is-it-possible.111323/post-694363 Upvote 0
saeed10051 Active Member Licensed User Longtime User Jun 22, 2020 #3 LucaMs said: https://www.b4x.com/android/forum/threads/b4xswitch-in-runtime-is-it-possible.111323/post-694363 Click to expand... Thanks LucaMs, i have used the example code over there which was originally for switch and replaced if for Swiftbutton. It is loading, however i am unable to set the button text as there is not text property shown in the swiftbutton1 property list. I have tried swiftbutton1.mbase.text but it is giving me following error java.lang.RuntimeException: Type does not match (class anywheresoftware.b4a.BALayout) Upvote 0
LucaMs said: https://www.b4x.com/android/forum/threads/b4xswitch-in-runtime-is-it-possible.111323/post-694363 Click to expand... Thanks LucaMs, i have used the example code over there which was originally for switch and replaced if for Swiftbutton. It is loading, however i am unable to set the button text as there is not text property shown in the swiftbutton1 property list. I have tried swiftbutton1.mbase.text but it is giving me following error java.lang.RuntimeException: Type does not match (class anywheresoftware.b4a.BALayout)
M Mahares Expert Licensed User Longtime User Jun 22, 2020 #4 saeed10051 said: the button text as there is not text property shown in the swiftbutton1 Click to expand... Code: Copy swiftbutton1.xLBL.Text= "Saeed" Upvote 0
saeed10051 said: the button text as there is not text property shown in the swiftbutton1 Click to expand... Code: Copy swiftbutton1.xLBL.Text= "Saeed"
Erel B4X founder Staff member Licensed User Longtime User Jun 23, 2020 #5 Newer tutorial: [B4X] I need 100 <custom view here>s. How to add programmatically? Upvote 0
saeed10051 Active Member Licensed User Longtime User Jun 23, 2020 #6 Erel said: Newer tutorial: [B4X] I need 100 <custom view here>s. How to add programmatically? Click to expand... Yes i have checked this one, it is working now. I am trying to manipulate the swiftbutton.setcolors, but it the data type over there is int. How can i get the int value for a certain color Upvote 0
Erel said: Newer tutorial: [B4X] I need 100 <custom view here>s. How to add programmatically? Click to expand... Yes i have checked this one, it is working now. I am trying to manipulate the swiftbutton.setcolors, but it the data type over there is int. How can i get the int value for a certain color
saeed10051 Active Member Licensed User Longtime User Jun 23, 2020 #7 Issue resolved I have used following code B4X: Copy Dim b As SwiftButton = Sender b.SetColors(xui.Color_Blue, xui.Color_Cyan) Upvote 0
Issue resolved I have used following code B4X: Copy Dim b As SwiftButton = Sender b.SetColors(xui.Color_Blue, xui.Color_Cyan)