from kivy.uix.boxlayout import BoxLayout from kivy.app import App from math import cos,sin,radians as rad class Ex14(BoxLayout): pass class Ex14App(App): def build(self): def ellie(a,b,orig,start_ang,stop_ang,seg): pts=[] step_ang=(stop_ang-start_ang)//seg for ang in range(start_ang,stop_ang+step_ang,step_ang): pts.extend([a*cos(rad(ang))+orig[0], b*sin(rad(ang))+orig[1]]) return pts self.Head=ellie(400,300,[400,300],-45,225,6) self.Chin=ellie(400,300,(400,300),225,315,3) self.Leye=ellie(60,40,[250,450],0,360,15) self.Reye=ellie(60,40,(550,450),0,360,15) self.Mouth=ellie(160,30,[400,200],0,360,25) self.Nose=ellie(5,50,(400,350),0,360,25) print(self.Chin) print(len(self.Chin)) return Ex14() if __name__=='__main__': Ex14App().run()
<Ex14>: canvas: Color: rgb: [.245+.05*random.random()]*3 Rectangle: pos: self.pos size: self.size Color: rgb: 1,.1,.5 Line: points: app.Head+app.Chin width: 3 Color: rgb: 1,.5,.1 Line: points: app.Leye width: 2 Line: points: app.Reye width: 2 Line: points: app.Mouth width: 2 Line: points: app.Nose width: 2
''' TabbedPanel ============ Test of the widget TabbedPanel. ''' from kivy.app import App from kivy.uix.tabbedpanel import TabbedPanel from kivy.lang import Builder Builder.load_string(""" <Test>: size_hint: 1, 1 pos_hint: {'center_x': .5, 'center_y': .5} do_default_tab: False TabbedPanelItem: text: 'first tab' Label: text: 'First tab content area' TabbedPanelItem: text: 'tab2' BoxLayout: Label: text: 'Second tab content area' Button: text: 'Button that does nothing' TabbedPanelItem: text: 'tab3' RstDocument: text: '\\n'.join(("Hello world", "-----------", "You are in the third tab.")) """) class Test(TabbedPanel): pass class TabbedPanelApp(App): def build(self): return Test() if __name__ == '__main__': TabbedPanelApp().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You might want to look at the examples/widgets/tabbed_panel_showcase.py
On Sun, Jul 9, 2017 at 4:15 PM, Engin Ceylan <enginc...@gmail.com> wrote:
Runnable example is in the site. ( http://pythonmobile.blogspot.com.tr/2014/06/14-line.html ) . I want to embed this figure in the above-mentioned tabbedpanel.
8 Temmuz 2017 Cumartesi 03:30:57 UTC+3 tarihinde ZenCODE yazdı:Your second post makes to mention of your <Ex14> class. So we really have no idea of the actual code you are running. Please post a complete, runnable example that we can help you with :-)
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.