BBC BASIC for Windows
« buttons »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:27pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: buttons  (Read 925 times)
nitwit
Guest
xx buttons
« Thread started on: May 4th, 2010, 5:53pm »

Or more precise 'rectangular pushbuttons'.

I've defined some characters (using pages 198 and 476
of the PDF version of the 'guide' - must be important stuff to appear twice!)

I want these to appear in the buttons but all I get is a thick vertical line. (They print on the screen OK). What's going wrong?
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: buttons
« Reply #1 on: May 4th, 2010, 10:06pm »

on May 4th, 2010, 5:53pm, Guest-nitwit wrote:
I want these to appear in the buttons but all I get is a thick vertical line. (They print on the screen OK). What's going wrong?

User-defined characters (created using VDU 23) are a feature provided by BBC BASIC's VDU drivers; they are part of the BBC Micro (Acorn) emulation subsystem built into BB4W for compatibility with earlier versions of BBC BASIC.

Output to a Windows control (like a push button, list box, static control etc.) is completely independent of the VDU drivers and takes place via a totally separate route (calling the Windows API).

So none of the facilities provided by the VDU drivers is available when you output to a Windows control. They are two quite separate ways of creating output - one compatible with Acorn OSes and one compatible with Windows.

To achieve what you are attempting would require you to convert the required symbol to a bitmap and then display that on the button. You could adapt the code recently discussed on the group:

http://tech.groups.yahoo.com/group/bb4w/message/13181

(using a button with the BS_BITMAP style).

Richard.
User IP Logged

nitwit
Guest
xx Re: buttons
« Reply #2 on: May 28th, 2010, 6:54pm »

That link takes me to a 'sign in page'. I don't want to sign up. In any case I suspect that the discussion would be too technical.

As a possible alternative, I see Sprites are available (page 877 of the 'guide') but there is no mention of a response to a mouse click. Is that not implemented?
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: buttons
« Reply #3 on: May 28th, 2010, 9:27pm »

on May 28th, 2010, 6:54pm, Guest-nitwit wrote:
That link takes me to a 'sign in page'. I don't want to sign up. In any case I suspect that the discussion would be too technical.

The link was to the BB4W discussion group. You ought to be a member, as it's the 'official' support group for BBC BASIC for Windows. It's also where any files referenced from this forum will be stored (since Conforums doesn't have an upload area), and you need to be a member to access them.

In particular, the message to which I linked itself links to this program:

http://groups.yahoo.com/group/bb4w/files/Graphics/drawstaticbox.bbc

which shows how to draw onto a Static Box. The code could be adapted to draw onto a button.

Quote:
As a possible alternative, I see Sprites are available (page 877 of the 'guide') but there is no mention of a response to a mouse click. Is that not implemented?

There's no provision for sprites to be used as buttons, if that's what you mean. The whole point of a sprite is that it can move 'in front of' the background, without erasing it. Buttons don't move (usually!), so a sprite has no advantage compared with a static graphics image.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls