So, I am trying to learn to create buttons. But I get a big problem. I want to create the button on the main screen. And I can't. There are no decent instructions for this. I am supposed to create the button as part of a group. I want the button to be on my main window. So far, the only group I have figured out exists is a new window. But I don't want a new window. What are the possible groups? Is it possible to have just a button without any group?
The code I used was:
SetBuffer BackBuffer()
Cls
While Not KeyHit(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;Interface;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;SetFont LoadFont("Arial",14)
Color 200,100,80
Rect 0,0,640,480,1
Color 150,200,225
Rect 0,0,640,20,1
;;;;;;;;;;;;;;;;;;; Buttons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
k1=0
kx=30
ky=80
Color 0,0,200
CreateButton( "First Button",100,100,100,20,MAINWINDOW,1)
Flip
Wend
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I have to create a window called MAINWINDOW to make this work. I don't want that.
Thanks for helping with this!
Guillermo
The code I used was:
SetBuffer BackBuffer()
Cls
While Not KeyHit(1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;Interface;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;SetFont LoadFont("Arial",14)
Color 200,100,80
Rect 0,0,640,480,1
Color 150,200,225
Rect 0,0,640,20,1
;;;;;;;;;;;;;;;;;;; Buttons ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
k1=0
kx=30
ky=80
Color 0,0,200
CreateButton( "First Button",100,100,100,20,MAINWINDOW,1)
Flip
Wend
End
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I have to create a window called MAINWINDOW to make this work. I don't want that.
Thanks for helping with this!
Guillermo