S Sanxion Active Member Licensed User Longtime User Mar 16, 2016 #1 Hi all What is the best method of adding a new line of code in this scenario: Every instance of: ivResult.Visible = True I want to add: ivSound.Visible = True So the code would look like: ivResult.Visible = True ivSound.Visible = True There are many instances of line (ivResult.Visible = True) which is why a manual procedure would take a very long time. Thanks
Hi all What is the best method of adding a new line of code in this scenario: Every instance of: ivResult.Visible = True I want to add: ivSound.Visible = True So the code would look like: ivResult.Visible = True ivSound.Visible = True There are many instances of line (ivResult.Visible = True) which is why a manual procedure would take a very long time. Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 16, 2016 #2 Never repeat the same code multiple times. There are many ways to implement it. A simple solution is to create a sub and call it: B4X: Sub ivVisible(Visible As Boolean) ivSound.Visible = Visible ivResult.Visible = Visible End Sub Upvote 0
Never repeat the same code multiple times. There are many ways to implement it. A simple solution is to create a sub and call it: B4X: Sub ivVisible(Visible As Boolean) ivSound.Visible = Visible ivResult.Visible = Visible End Sub
S Sanxion Active Member Licensed User Longtime User Mar 16, 2016 #3 Erel said: Never repeat the same code multiple times. There are many ways to implement it. A simple solution is to create a sub and call it: B4X: Sub ivVisible(Visible As Boolean) ivSound.Visible = Visible ivResult.Visible = Visible End Sub Click to expand... Thank-you Erel. Upvote 0
Erel said: Never repeat the same code multiple times. There are many ways to implement it. A simple solution is to create a sub and call it: B4X: Sub ivVisible(Visible As Boolean) ivSound.Visible = Visible ivResult.Visible = Visible End Sub Click to expand... Thank-you Erel.