[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [Dip @phil Thompson] A small popover is displayed first If you RadioButtons, how to fix it?
From:       "=?gb18030?B?ucLEvrPJwdY=?=" <625781186 () qq ! com>
Date:       2020-05-28 14:51:52
Message-ID: tencent_A8F57AB209F558E0E509180E2CE444D14C07 () qq ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Code :


```
from dip.model import Enum, Model, Str, Int, unadapted
from dip.ui import Application, Dialog, SpinBox, HBox, DialogController, RadioButtons, CheckBox, ComboBox


class DataModel(Model):
&nbsp; &nbsp; name = Str("")
&nbsp; &nbsp; w = Int(100)
&nbsp; &nbsp; h = Int(100)
&nbsp; &nbsp; test = Enum("1", "2", "3")


model = DataModel()


# Every application needs an Application.
app = Application()


view_factory = Dialog(


&nbsp; &nbsp; RadioButtons('test',),
&nbsp; &nbsp; # ComboBox('test', vertical = False),
&nbsp; &nbsp; HBox('name',
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SpinBox('w', suffix = " years"),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SpinBox('h', suffix = " years"),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;),
&nbsp; &nbsp; window_title = "Dialog with Settings")


view = view_factory(model)
view.execute()
print("Name:", model.name)



```
[Attachment #5 (text/html)]

<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><div>Code \
:</div><div><br></div><div>```</div><div><div>from dip.model import Enum, Model, Str, \
Int, unadapted</div><div>from dip.ui import Application, Dialog, SpinBox, HBox, \
DialogController, RadioButtons, CheckBox, ComboBox</div><div><br></div><div>class \
DataModel(Model):</div><div>&nbsp; &nbsp; name = Str("")</div><div>&nbsp; &nbsp; w = \
Int(100)</div><div>&nbsp; &nbsp; h = Int(100)</div><div>&nbsp; &nbsp; test = \
Enum("1", "2", "3")</div><div><br></div><div>model = \
DataModel()</div><div><br></div><div># Every application needs an \
Application.</div><div>app = Application()</div><div><br></div><div>view_factory = \
Dialog(</div><div><br></div><div>&nbsp; &nbsp; \
RadioButtons('test',),</div><div>&nbsp; &nbsp; # ComboBox('test', vertical = \
False),</div><div>&nbsp; &nbsp; HBox('name',</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;SpinBox('w', suffix = " years"),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;SpinBox('h', suffix = " years"),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;),</div><div>&nbsp; &nbsp; window_title = "Dialog with \
Settings")</div><div><br></div><div>view = \
view_factory(model)</div><div>view.execute()</div><div>print("Name:", \
model.name)</div></div><div><br></div><div>```</div><div><br></div><div><img \
src="cid:2E39D12E@D332BD58.08D0CF5E.gif" modifysize="52%" diffpixels="8px" \
scalingmode="zoom" style="width: 618px; height: \
333px;"><br><br></div><div><br></div><div><br></div>


["2E39D12E@D332BD58.08D0CF5E.gif.jpg" (image/jpeg)]
["dialog3.py" (application/octet-stream)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic