473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

KixForm, a (little) GUI for Python + PyWin32 ?

Hi!

I had found (since only 2 hours) that KixForm can to do used by Python +
PyWin32

At the end of the message, a very small example

It's an Active-X, in one file (.DLL), and one help-file (.CHM)

It is limited, but simple

Download here :
http://www.kixforms.org/assets/files...Xforms_230.zip
@-salutations

Michel Claveau


# -*- coding: cp1252 -*-

import time
import win32com.client

kgui = win32com.client.Dispatch('Kixtart.System')

def rgb(r,g,b):
return (r*256+g)*256+b

form=kgui.Form()
form.ClientSize=(520,220)
form.Font = "Verdana"
form.Text = "Titre de la fenêtre"

label = form.Controls.Label()
label.Font = "Verdana",
label.FontSize = 18
label.ForeColor = rgb(127,0,0)
label.FontBold = True
label.Text = "(vide)"
label.Top=40
label.Left=40
label.Size=(550,30)

bouton1= form.Controls.Button()
bouton1.Size=(80,30)
bouton1.Text="vraiment"
bouton1.Font = "Verdana",
bouton1.FontSize = 12
bouton1.OnClick="BT1"
bouton1.Left=20
bouton1.Top=100

bouton2= form.Controls.Button()
bouton2.Size=(80,30)
bouton2.Text="On"
bouton2.Font = "Verdana",
bouton2.FontSize = 12
bouton2.OnClick="BT2"
bouton2.Left=120
bouton2.Top=100

bouton3= form.Controls.Button()
bouton3.Size=(80,30)
bouton3.Text="a"
bouton3.Font = "Verdana",
bouton3.FontSize = 12
bouton3.OnClick="BT3"
bouton3.Left=220
bouton3.Top=100

bouton4= form.Controls.Button()
bouton4.Size=(80,30)
bouton4.Text="soif."
bouton4.Font = "Verdana",
bouton4.FontSize = 12
bouton4.OnClick="BT4"
bouton4.Left=320
bouton4.Top=100

bouton5= form.Controls.Button()
bouton5.Size=(80,30)
bouton5.Text="très"
bouton5.Font = "Verdana",
bouton5.FontSize = 12
bouton5.OnClick="BT5"
bouton5.Left=420
bouton5.Top=100

btquit= form.Controls.Button()
btquit.Size=(160,30)
btquit.Text="Terminer "
btquit.Font = "Verdana",
btquit.FontBold = True
btquit.FontItalic = True
btquit.FontSize = 18
btquit.OnClick="QUIT"
btquit.Top=170
btquit.Left=180
form.Show()
txt=''
while form.Visible:
action=kgui.Application.DoEvents()
if action=='BT1': txt=txt+' '+bouton1.Text
if action=='BT2': txt=txt+' '+bouton2.Text
if action=='BT3': txt=txt+' '+bouton3.Text
if action=='BT4': txt=txt+' '+bouton4.Text
if action=='BT5': txt=txt+' '+bouton5.Text
if action=="QUIT": break
label.Text=txt
time.sleep(0.5)

print 'Résultat :',label.Text


Dec 29 '05 #1
0 1143

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrea Gavana | last post by:
Hi All, I have a very simple python script that tries to put a rectangular shape in a worksheet and then add some text inside that shape. The main problem, is that as usual Excel doesn't like...
7
by: vml | last post by:
Hello, I am trying to promote python in my job, my collegue only see matlab and microsoft scripting language. I understood that there willl be no backward compatibility between python 2.x and...
4
by: Xavier | last post by:
Hi, I try to access to a Bluetooth GPS data-logger with Python. I use pySerial. Sending and receiving little messages (~100 char) works fine. However, when I ask the GPS to dump the trails,...
2
Subsciber123
by: Subsciber123 | last post by:
I am working on a program that would make firefox accessible to locked-in patients. What I need to be able to do is from python, find all the links and buttons on the active web page. I need to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.