how to change button position

Previous topic - Next topic

lanslot

as the title
i try to use ddgui,like this:
Code (glbasic) Select

LOCAL id_btn_ok$
id_btn_ok$ = "btn_ok"
SETSCREEN 320,240,FALSE
DDgui_pushdialog(0,0,320,240)
DDgui_button(id_btn_ok$,"Hello",32,24)
DDgui_set(id_btn_ok$,"XPOS","50")
WHILE TRUE
DDgui_show(FALSE)
SHOWSCREEN
WEND

i know that property - "xpos,ypos" is only use to dialog
so,how do you adjust another widget position

kanonet

In DDGui you can not set a widget to a specific position, they are all only defined relative to each other. If I remember correctly, there is a spacer object that you can set in front of an other object to move that other object to where you want it to be.

You may want to have a look at my old DDcreator.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

erico

Nice creator there kanonet, I didn´t know about that, bookmarked.

lanslot

i try to use ddcreator
tips dialog didn't disappear when time is 0.01 ,it always on the top,and i cannot add any widget.. :(

kanonet

I just tried it again: 1st try did not work because my antivir/firewall did block it, but after I allowed this, it is working. Please note, that it will run 2 program instances that communicate with each other using TCP network traffic, so you need to allow this if you want the DDcreator to work.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Kitty Hello

Try DDguiSet (id $,"ALIGN",0) to horizontally align it.

kanonet

Align only gives 3 Positions: -1=left, 0=center, 1=right. That is not exactly the same as free positioning everywhere, I still think placing a spacer in front gives better results.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64