가 어떻게 선 (구분자)를 삽입 할 수있는 KV 파일보기 위젯 사이, 그리고 KV 파일에 그리드 뷰도 색 테두리 경계 TextInput
상자에 max_chars
기능이 있습니다.라인을 삽입하고, 색상은 그리드
현재 KV 파일 :
<[email protected]>
text_size: self.size
valign: 'middle'
<ContactFrm>
padding: 5,5
orientation: 'vertical'
#row_default_height: '36dp'
#cols:1
#spacing: 0,0
GridLayout:
cols: 4
row_default_height: '32dp'
row_force_default: True
spacing: 10,0
size_hint_y: None
#height:34
Label:
text: 'Name'
size_hint_x: 0.5
TextBox:
id:name
max_chars:35
Label:
text: 'Contact Name'
size_hint_x: 0.5
TextBox:
id:contactname
max_chars:35
GridLayout:
cols: 4
row_default_height: '32dp'
row_force_default: True
spacing: 10,0
size_hint_y: None
#height: 36
Label:
text: 'Mobile 1'
size_hint_x: 0.5
TextBox:
id:mob1
max_chars:35
Label:
text: 'Mobile 2'
size_hint_x: 0.5
TextBox:
id:mob2
max_chars:35
Label:
text: 'Landline'
size_hint_x: 0.5
TextBox:
id:land1
max_chars:35
Label:
text: 'E-mail'
size_hint_x: 0.5
TextBox:
id:email1
max_chars:75
GridLayout:
row_default_height: '32dp'
row_force_default: True
spacing: 10,0
cols: 4
size_hint_y: None
#height: 36
Label:
text: 'Street 1'
size_hint_x: 0.5
TextBox:
id:street1
max_chars:75
Label:
text: 'Street 2'
size_hint_x: 0.5
TextBox:
id:street2
max_chars:75
Label:
text: 'Area'
size_hint_x: 0.5
TextBox:
id:area
max_chars:75
Label:
text: 'City'
size_hint_x: 0.5
TextBox:
id:city
max_chars:35
Label:
text: 'District'
size_hint_x: 0.5
TextBox:
id:district
max_chars:35
Label:
text: 'State'
size_hint_x: 0.5
TextBox:
id:state
max_chars:35
Label:
text: 'Zip Code'
size_hint_x: 0.5
TextBox:
id:zipcode
max_chars:10
BoxLayout:
내가 좀 순진 수 있습니다 위의 코드 그래서 모든 나는 또한 향상시킬 수있는, 조언을 바랍니다, 파이썬과 kivy 모두 새로운 오전. 고맙습니다.
최종 코드 두께도 제공 할 수 있도록 내가 수정에 사용되는 :
<[email protected]>:
id: separator
size_hint_y: None
height: 6
thickness: 2
canvas:
Color:
rgb: .24, .65, .94
Rectangle:
#pos: 0, separator.center_y
pos: self.pos[0], separator.center_y
size: separator.width, self.thickness
내가 Kivy에 새로운 해요하지만 : 당신은 당신이 구분자로 사용할 수있는 위젯이 있는지 여부를 문서 (또는 인터넷)에서 검색 했습니까? – furas