tdocs2 Well-Known Member Licensed User Longtime User Jan 1, 2015 #1 Greetings, all. Thank you in advance for answering my question. In the Designer of B4A v4, we have the capability to add a border to a panel selecting border color and width. QUESTION How do I add a border to a panel that I add in code: Activity.Addview(panel1...)? The dropdown list that shows after entering panel1. in the code does not show border as an option. In the past, I used the panel (color1) upon panel(color2) to get a border effect. Best regards. Sandy
Greetings, all. Thank you in advance for answering my question. In the Designer of B4A v4, we have the capability to add a border to a panel selecting border color and width. QUESTION How do I add a border to a panel that I add in code: Activity.Addview(panel1...)? The dropdown list that shows after entering panel1. in the code does not show border as an option. In the past, I used the panel (color1) upon panel(color2) to get a border effect. Best regards. Sandy
M Martincg Member Licensed User Longtime User Jan 2, 2015 #2 I don't have an answer but I am interested in this. I thought that the easiest way to produce what you want in a program would be to design one until you get what you want, then whenever you need a panel like that you could say something like Code: Copy Private example as panel' this is the designed panel Private NewPanel1 As Panel NewPanel1.assign(example) '?? some method needed to copy all the properties of a panel. NewPanel1.width = 300 etc I posted a question asking how to do this but made no progress. If you know then I would like to find out. Upvote 0
I don't have an answer but I am interested in this. I thought that the easiest way to produce what you want in a program would be to design one until you get what you want, then whenever you need a panel like that you could say something like Code: Copy Private example as panel' this is the designed panel Private NewPanel1 As Panel NewPanel1.assign(example) '?? some method needed to copy all the properties of a panel. NewPanel1.width = 300 etc I posted a question asking how to do this but made no progress. If you know then I would like to find out.
stevel05 Expert Licensed User Longtime User Jan 2, 2015 #3 You could try the code posted here and see if it does what you want: https://www.b4x.com/android/forum/threads/add-border-to-views-and-change-checkbox-graphic.36436/ Upvote 0
You could try the code posted here and see if it does what you want: https://www.b4x.com/android/forum/threads/add-border-to-views-and-change-checkbox-graphic.36436/
mangojack Expert Licensed User Longtime User Jan 2, 2015 #4 try this .. Code: Copy Dim c As ColorDrawable c.Initialize2(Colors.White,5dip,3dip,Colors.Red) Panel1.Background = c Last edited: Jan 2, 2015 Upvote 1
try this .. Code: Copy Dim c As ColorDrawable c.Initialize2(Colors.White,5dip,3dip,Colors.Red) Panel1.Background = c
tdocs2 Well-Known Member Licensed User Longtime User Jan 2, 2015 #5 @Martincg, I cannot be of help in this area. Sandy @@@@@@@ @Steve, Thank you. I had seen the thread. Comprehensive and sophisticated piece of coding, indeed. I have not had an opportunity to use it. @mangojack (MJ), Very clever and succinct. I tested it. Thank you. Best regards to both. Sandy Upvote 0
@Martincg, I cannot be of help in this area. Sandy @@@@@@@ @Steve, Thank you. I had seen the thread. Comprehensive and sophisticated piece of coding, indeed. I have not had an opportunity to use it. @mangojack (MJ), Very clever and succinct. I tested it. Thank you. Best regards to both. Sandy