iOS Question Some Baisc Questions in B4i

BerlinCoder

Member
Licensed User
Hi All,

I have a few questions in b4i,
1- Is there any ready rate bar in b4i, something like star rate bar ? I have looked before, but I couldn't find anything for b4i. Since this one seems to be an essential component for app programming I think there should some ratebar for b4i??!

2- I use a panel with edit text inside. In order to fetch some records from my database, I need to kresize the height of each the textbox based on the lenght of strings in the database table, how can I do it?

Best,
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
1. There is no native rate bar in iOS. I don't think that any one has implemented a star bar.

2. Don't use TextField unless you need the text to be editable. You can call Label.SizeToFit to set the label size.
Check CustomListView. You can use CLV.AddTextItem to add a scrollable text item with the correct size.
 
Upvote 0

BerlinCoder

Member
Licensed User
1. There is no native rate bar in iOS. I don't think that any one has implemented a star bar.

2. Don't use TextField unless you need the text to be editable. You can call Label.SizeToFit to set the label size.
Check CustomListView. You can use CLV.AddTextItem to add a scrollable text item with the correct size.
Erel, I have done that, but I still have problem. As you can see ,the label is a part inside of the panel and I need to get the height of the panel?


B4X:
txtQuestion.SizeToFit
Pnl_Qeustion.SizeToFit          
clv1.Add(Pnl_Qeustion,Pnl_Qeustion.Height,"")

I also have sent my project by a pm to you ... please help me!
 
Last edited:
Upvote 0

BerlinCoder

Member
Licensed User
B4X:
  Dim Pnl_Qeustion As Panel
  Pnl_Qeustion.Initialize("") 
  Pnl_Qeustion.LoadLayout("Template_Panel_English_Chat")
  txtQuestion.Text=description ' my content     
                '//////  here I have problem to fit the height of the panel view to its label [ label displays received messages ]
                '////// I need to cchange the height of the panels automatically.....
 
             
txtQuestion.SizeToFit
Pnl_Qeustion.SizeToFit
Pnl_Qeustion.SizeToFit 
clv1.Add(Pnl_Qeustion,200,"")  ' ??? ?? :((((
The issue is , I use a label inside of a panel, because of graphical things I can not simply add my message inside of a label...
ok i will upload my code here but the thing is both of the panel and the label inside must fit to the content.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
How did you make the zip file?
I get a setup.exe file from your zip !?
You should use Export As Zip in the File munu in the IDE!

upload_2017-4-18_13-3-7.png
 
Upvote 0
Top