log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Git client updated to 0.07 (News:1)
- Archive Edition 27:1 reviewed (News:)
- Rougol April 2024 meeting on monday is Anniversary time (News:1)
- WROCC April 2024 meeting o...changes to our phone lines (News:1)
- April developer 'fireside' chat is on saturday night (News:)
- March 2024 News Summary (News:4)
- WROCC Newsletter Volume 41:11 reviewed (News:)
- WROCC March 2024 meeting o... Hughes and Peter Richmond (News:1)
- Rougol March 2024 meeting on monday with Bernard Boase (News:)
- Drag'n'Drop 13i2 edition reviewed (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: Creating icons in BASIC
 
  Creating icons in BASIC
  (14:58 15/6/2002)
  monkeyson (17:29 28/11/2001)
    rich (14:58 15/6/2002)
      rich (14:58 15/6/2002)
        monkeyson (13:19 29/11/2001)
          rich (14:58 15/6/2002)
        takkaria (14:58 15/6/2002)
        monkeyson (14:58 15/6/2002)
          rich (14:58 15/6/2002)
            moss (14:58 15/6/2002)
              rich (14:58 15/6/2002)
  andypoole (14:58 15/6/2002)
 
monkeyson Message #4885, posted at 17:29, 28/11/2001, in reply to message #4884
Unregistered user You're creating the icons with negative y co-ordinates, and then setting the window y extent from 0 to a positive number. This means the icons will be positioned outside the viewable area of the window.

shouldn't the window's vertical size be
min -(3*44)+(2*8 )
max 0

????

However I reserve the right for all that I have said above to be utter tosh.

[Edited by monkeyson at 17:31, 28/11/2001]

  ^[ Log in to reply ]
 
monkeyson Message #4888, posted at 13:19, 29/11/2001, in reply to message #4887
Unregistered user Dig out your AUCD1 and look through the Acorn Computing Coverdisks. There was an article by Ben Summers about using files, and there was a neat little example which did exactly what you want. It might have been in a directory called 'UsingFiles'....
  ^[ Log in to reply ]
 
rich Message #4884, posted at 14:58, 15/6/2002
Unregistered user Hi,

/me hangs head in shame and asks the following:

How do you create new icons in BASIC, and then resize the window around them? I can do one or the other, but both together seems to disappear the icons unhappy

I've knocked up a small test program which loads a shell desktop app; it loads a template file with a blank window and I can create some icons on it using Wimp_CreateIcon, and when I click on these icons they report back icon 0,1,2... etc. has been clicked on. Using Wimp_SetExtent resizes the window to the correct size, but the icons aren't there, whether I create them before or after the resize.

I'm guessing the window can't tell how many icons are on it, so it's falling back to 0; but poking the number of icons to windowhandle%!84 results in Very Bad Things happening unhappy

A bit more info is at http://www.houseofmabel.com/rich_is_thick/ - there's a small image of a working version of what I want the code to do, but that's using a cheating pre-defined template. I need to create a menu-like window that can grow or shrink depending on how many items are on it, but can display 24bit colour icons under RISC OS 3.x

  ^[ Log in to reply ]
 
rich Message #4886, posted at 14:58, 15/6/2002, in reply to message #4885
Unregistered user Woohoo! It works! Ta for that monkeyson, I would have been banging my head against that for days! grin
  ^[ Log in to reply ]
 
rich Message #4887, posted at 14:58, 15/6/2002, in reply to message #4886
Unregistered user [BTW, anyone got any nice, easy code for recursive directory searches while we're here? smile ]
  ^[ Log in to reply ]
 
rich Message #4889, posted at 14:58, 15/6/2002, in reply to message #4888
Unregistered user Okay, tried that but no joy. (Especially as the CD is in such bad shape it crashes CDFS, so I have to use a PC and LanMan... unhappy )

Anyone got a copy of said file?

  ^[ Log in to reply ]
 
takkaria Message #4890, posted at 14:58, 15/6/2002, in reply to message #4887
Unregistered user I've got one, but unfortunately it's written in C. tongue
  ^[ Log in to reply ]
 
andypoole Message #4891, posted at 14:58, 15/6/2002, in reply to message #4884
Unregistered user the rich_is_thick URI gives a 404 unhappy
  ^[ Log in to reply ]
 
monkeyson Message #4892, posted at 14:58, 15/6/2002, in reply to message #4887
Unregistered user
[BTW, anyone got any nice, easy code for recursive directory searches while we're here? smile ]

If you're still looking for this, try here:
http://www.acornsearch.com/cgi/sh-cgi?manual=OS&page=OS_GBPB9

  ^[ Log in to reply ]
 
rich Message #4893, posted at 14:58, 15/6/2002, in reply to message #4892
Unregistered user Already done - see here smile

Edit: Doh, I didn't read your message properly, I thought you meant the icon thing. Although I have already got some recursive directory code too in the desktop themes prog.

  ^[ Log in to reply ]
 
moss Message #4894, posted at 14:58, 15/6/2002, in reply to message #4893
Unregistered user

Edit: Doh, I didn't read your message properly, I thought you meant the icon thing. Although I have already got some recursive directory code too in the desktop themes prog.
Do you know when that'll be finished? smile
  ^[ Log in to reply ]
 
rich Message #4895, posted at 14:58, 15/6/2002, in reply to message #4894
Unregistered user Erm, RSN... wink

Look, I took the weekend off to go see my Mum, that's more important than programming!

  ^[ Log in to reply ]
 

The Icon Bar: Programming: Creating icons in BASIC