I have a button in a frame and when I change the vert-margin and horiz-margin 
in the code the button doesn't change it's location but rather the frame gets 
smaller or larger.

This is the code:

(require racket/gui/base)

(define frame (new frame% [label "GUI BUILDER"]
                      [width 300]
                      [height 400]
                      [style '(no-resize-border)]))

(send frame show #t)

(define msg (new message% [parent frame]
                          [label "Text"]))

(new button% [parent frame]
             [label "Generate button code"]
             [vert-margin 200]   
             [horiz-margin 480]
             [callback (lambda (button event)
                         (send msg set-label "Changed"))])



Someone suggested me to create a vertical-panel that has 2 rows of horizontal 
panels, the height of the first horizontal panel determining the Y-coordinates 
and the width of the smaller panel in the second horizontal panel determining 
the X-coordinates of the button.

The purpose of this project is to make a GUI Builder where the user drags 
buttons on a frame and the position of the cursor changes in the code the X and 
Y axis. This would be impossible with building 3 panels for each button in a 
frame that has for example 20 buttons.

Is there a way to add the X and Y coordinates in code without doing hacks?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to