|
Creating icons in BASIC |
|
(13:58 15/6/2002) monkeyson (17:29 28/11/2001) rich (13:58 15/6/2002) rich (13:58 15/6/2002) monkeyson (13:19 29/11/2001) rich (13:58 15/6/2002) takkaria (13:58 15/6/2002) monkeyson (13:58 15/6/2002) rich (13:58 15/6/2002) moss (13:58 15/6/2002) rich (13:58 15/6/2002) andypoole (13: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 13: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 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 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 13:58, 15/6/2002, in reply to message #4885 |
Unregistered user
|
Woohoo! It works! Ta for that son, I would have been banging my head against that for days! |
|
[ Log in to reply ] |
|
rich |
Message #4887, posted at 13: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? ] |
|
[ Log in to reply ] |
|
rich |
Message #4889, posted at 13: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... ) Anyone got a copy of said file? |
|
[ Log in to reply ] |
|
takkaria |
Message #4890, posted at 13:58, 15/6/2002, in reply to message #4887 |
Unregistered user
|
I've got one, but unfortunately it's written in C. |
|
[ Log in to reply ] |
|
andypoole |
Message #4891, posted at 13:58, 15/6/2002, in reply to message #4884 |
Unregistered user
|
the rich_is_thick URI gives a 404 |
|
[ Log in to reply ] |
|
monkeyson |
Message #4892, posted at 13: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? ] 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 13:58, 15/6/2002, in reply to message #4892 |
Unregistered user
|
Already done - see here 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 13: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? |
|
[ Log in to reply ] |
|
rich |
Message #4895, posted at 13:58, 15/6/2002, in reply to message #4894 |
Unregistered user
|
Erm, RSN... Look, I took the weekend off to go see my Mum, that's more important than programming! |
|
[ Log in to reply ] |
|
|