Loading a Stringbuilder value into a Panel value

MDEnt

Member
Licensed User
Longtime User
Wondering if this is possible - I've tried a few ways - and if it is possible - I keep getting the syntax wrong.

.
.
.
Dim sbpnl As StringBuilder
sbpnl.Initialize
sbpnl.Append("pnl").Append(aValue)
Dim thePanel As Panel
thePanel=sbpnl
.
.
.

I run into the problem on the very last line during compile - where it takes the string builder into thePanel - I'm not sure if that sort of conversion is possible.
 
Last edited:

MDEnt

Member
Licensed User
Longtime User
The next block of code not pasted in my example initializes the panel, adds the view etc...

I was looking to take a value (aValue) and display from variety of possible panels based on what aValue contains. (Prefixed with the "pnl" - although that isn't entirely necessary)
 
Last edited:
Upvote 0

MDEnt

Member
Licensed User
Longtime User
I was simply trying to invoke one of many panels with a variable for the panel name (thePanel), rather than expicitly calling each panel (pnl01,pnl02,pnl03...).

I used the same Stringbuilder technique elsewhere in code to call subs/maintain current position in the app working fine. Just playing around and testing to see if it worked with a panel to reduce lines of code....
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…