Buttons on meta-files
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Buttons on meta-files
Hello,
A application that I wrote is generating drawing by using meta-files.
Then I display them and by using oMeta:blClicked := {|nRow, nCol, nKeyFlags| myfunc(nRow, nCol, nKeyFlags)} I check where the mouse is clicked, then I jump to another drawing.
I was wondering that I can use some kind of buttons, it would me easyer because than I don't calculate the area's where the mouse can be clicked. The area's are not always on the same place, and the number of areas can be different.
Thanks,
Marc
A application that I wrote is generating drawing by using meta-files.
Then I display them and by using oMeta:blClicked := {|nRow, nCol, nKeyFlags| myfunc(nRow, nCol, nKeyFlags)} I check where the mouse is clicked, then I jump to another drawing.
I was wondering that I can use some kind of buttons, it would me easyer because than I don't calculate the area's where the mouse can be clicked. The area's are not always on the same place, and the number of areas can be different.
Thanks,
Marc
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Marc,
> Do I have to release the buttons while ending the window with the buttons?
No, its not needed as they will be automatically destroyed
>
If I call the BTNBMP the first time, everthing is fine. The second time, the text in the buttons are missind, and the other text on the screen are bold.
>
Have you defined a font for the buttons ? If yes, do this: oFont:nCount++
> Do I have to release the buttons while ending the window with the buttons?
No, its not needed as they will be automatically destroyed
>
If I call the BTNBMP the first time, everthing is fine. The second time, the text in the buttons are missind, and the other text on the screen are bold.
>
Have you defined a font for the buttons ? If yes, do this: oFont:nCount++
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Antonio,
Do I have to put this each time before creating a button like this :
Marc
Do I have to put this each time before creating a button like this :
Code: Select all
aadd(metatoetsen,nil)
schermfont :nCount++
@ y_cor(y+4), x_cor(x-1 ) BTNBMP metatoetsen[len(metatoetsen)] RESOURCE 'GEEL','GEEL2' PROMPT text of oMeta SIZE x_cor(52),x_cor(13) FONT schermfont action ganaarpunt(text) PIXEL
aadd(metatoetsen,nil)
schermfont :nCount++
@ y_cor(y+4), x_cor(x-11) BTNBMP metatoetsen[len(metatoetsen)] RESOURCE 'GEEL','GEEL2' PROMPT ct of oMeta SIZE x_cor(10),x_cor(13) FONT schermfont action ganaarpunt(text) PIXEL
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: