stari Active Member Licensed User Longtime User Jan 29, 2015 #1 hi, i can't find, how to make round Button in B4i, like in B4a - cdwColor.Initialize(Colors.White ,50dip).
hi, i can't find, how to make round Button in B4i, like in B4a - cdwColor.Initialize(Colors.White ,50dip).
ciginfo Well-Known Member Licensed User Longtime User Jan 29, 2015 #2 With Corner radius Property in th designer Upvote 0
klaus Expert Licensed User Longtime User Jan 29, 2015 #3 Set the Width and Height properties to the same value and the corner radius to the half of that value. Upvote 0
Set the Width and Height properties to the same value and the corner radius to the half of that value.
stari Active Member Licensed User Longtime User Jan 29, 2015 #4 klaus said: Set the Width and Height properties to the same value and the corner radius to the half of that value. Click to expand... thks, klaus. And with the code ? Ah, can i achive this with SetBorder ? Upvote 0
klaus said: Set the Width and Height properties to the same value and the corner radius to the half of that value. Click to expand... thks, klaus. And with the code ? Ah, can i achive this with SetBorder ?
klaus Expert Licensed User Longtime User Jan 29, 2015 #5 B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw Upvote 0
B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw
stari Active Member Licensed User Longtime User Jan 29, 2015 #6 klaus said: B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw Click to expand... Thks very much. Upvote 0
klaus said: B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw Click to expand... Thks very much.
stari Active Member Licensed User Longtime User Jan 29, 2015 #7 klaus said: B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw Click to expand... Ops, what library must i use for ColorDrawable in B4i ?? I can't find. Upvote 0
klaus said: B4X: Dim Button1 As Button Button1.Initialize("Button1") Activity.AddView(Button1, 50dip, 50dip, 100dip, 100dip) Button1.Text="TEST1" Dim cdw As ColorDrawable cdw.Initialize2(Colors.Red, 50dip, 1dip, Colors.Black) Button1.Background = cdw Click to expand... Ops, what library must i use for ColorDrawable in B4i ?? I can't find.
klaus Expert Licensed User Longtime User Jan 29, 2015 #8 You don't need any library it's part of the core library. Upvote 0
stari Active Member Licensed User Longtime User Jan 29, 2015 #9 klaus said: You don't need any library it's part of the core library. Click to expand... Hello, my B4i is version 1.80, iCore version 1.78 but for me "ColorDrawable" don't work. (Missing a library reference). I don't understand. Upvote 0
klaus said: You don't need any library it's part of the core library. Click to expand... Hello, my B4i is version 1.80, iCore version 1.78 but for me "ColorDrawable" don't work. (Missing a library reference). I don't understand.
klaus Expert Licensed User Longtime User Jan 29, 2015 #10 Sorry, I was thinking in B4A instead of B4i ! B4X: Private Button1 As Button Button1.InitializeCustom("Button1", Colors.Black, Colors.Blue) Page1.RootPanel.AddView(Button1, 50, 50, 100, 100) Button1.Color = Colors.Red Button1.SetBorder(1, Colors.Black, 50) Upvote 0
Sorry, I was thinking in B4A instead of B4i ! B4X: Private Button1 As Button Button1.InitializeCustom("Button1", Colors.Black, Colors.Blue) Page1.RootPanel.AddView(Button1, 50, 50, 100, 100) Button1.Color = Colors.Red Button1.SetBorder(1, Colors.Black, 50)
stari Active Member Licensed User Longtime User Jan 30, 2015 #11 klaus said: Sorry, I was thinking in B4A instead of B4i ! B4X: Private Button1 As Button Button1.InitializeCustom("Button1", Colors.Black, Colors.Blue) Page1.RootPanel.AddView(Button1, 50, 50, 100, 100) Button1.Color = Colors.Red Button1.SetBorder(1, Colors.Black, 50) Click to expand... Tank you, klaus, all is workong OK. Have a nice weekend. Upvote 0
klaus said: Sorry, I was thinking in B4A instead of B4i ! B4X: Private Button1 As Button Button1.InitializeCustom("Button1", Colors.Black, Colors.Blue) Page1.RootPanel.AddView(Button1, 50, 50, 100, 100) Button1.Color = Colors.Red Button1.SetBorder(1, Colors.Black, 50) Click to expand... Tank you, klaus, all is workong OK. Have a nice weekend.