Shortcut grouping in LsBox Thread last updated on 2003-04-11 11:49:01

Posted by member 12135 on 2003-04-11 05:09:34

Well, to get straight to the point, i've made an lsbox containing the setup panel for the display, my plan was to have a small triangle button at the bottom (pagedown.bmp), to do a [!ShortcutGroupShow #x] [!shortcutgrouphide #x] style thing so clicking the button would go to the second page, dispbg.bmp is the background pic for the first page, and dispbg2.bmp is the second bg pic respectivly, i've torn out the buttons from the below code, but left the background pics and page switch button..

when i try this, no matter how i position the layers, hoving over the normal background switches to the second page then back again when i stop. any ideas guys?

*Shortcut "Switch page" 78 88 "$ThemeDir$box\pagedown.bmp" "$ThemeDir$box\pagedownb.bmp" .none #9 !execute [!ShortcutGroupHide #9] [!ShortcutGroupShow #1]
*Shortcut "" 0 0 "$ThemeDir$box\dispbg.bmp" "$ThemeDir$box\dispbg2.bmp" .none #9 !none
*Shortcut "Switch page" 78 88 "$ThemeDir$box\pagedown.bmp" "$ThemeDir$box\pagedownb.bmp" .none #1 !execute [!ShortcutGroupShow #9] [!ShortcutGroupHide #1]
*Shortcut "" 0 0 "$ThemeDir$box\dispbg2.bmp" "$ThemeDir$box\dispbg2.bmp" .none #1 !none

Posted by member 333 on 2003-04-11 05:20:46 link

You've got
!ShortcutGroupHide #1
which I believe should be
!ShortcutGroupHide 1


Note the removal of #

I don't know if this could be the culprit here, but it's worth a shot, innit.

Posted by member 333 on 2003-04-11 05:24:16 link

btw, do you know whether it's possible to extract icons and use them as shortcuts with lsbox? I've tried things, but it didn't work.

Posted by member 12135 on 2003-04-11 05:32:42 link

hmm, cant fix it

if someone feels like giving it a go.
http://www.naoneo.com/isotanium/isotanium.zip
the file is isotanium\box\disp.box

the shortcut group numbers used are 7 and 8, the rest are used up in step.rc

anyone willing to help will earn themself a place in the about window (not amazing, but better then nothing)

thanks guys :)

Posted by member 12135 on 2003-04-11 05:34:31 link

TucknDar - i've never tried that before, i'll have a sniff around and see if i can do it

Posted by member 333 on 2003-04-11 05:56:05 link

I didn't actually look at the file you said, but this is probably the problem:
*Shortcut "" 0 0 "$ThemeDir$box\dispbg.bmp" "$ThemeDir$box\dispbg2.bmp" .none #9 !none

See? dispbg.bmp is the normal bmp, while is the hovering one, and that means that whenever you hover over dispbg.bmp, you WILL see dispbg2.bmp.

From what I understood of your problem, this would be the problem.

You need two separate shortcuts to do what you want, ie.:
*Shortcut "" 0 0 "$ThemeDir$box\dispbg.bmp" .none .none #9 !none
*Shortcut "" 0 0 "$ThemeDir$box\dispbg2.bmp" .none .none #10h !none

and then the triangle-button would be like this:
*Shortcut "Switch page" 78 88 "$ThemeDir$box\pagedown.bmp" "$ThemeDir$box\pagedownb.bmp" .none #1 !execute [!ShortcutGroupShow 10] [!ShortcutGroupHide 9]

You might also wanna make another pagedowngroup for the second page, to do the opposite, but I'll leave that to you ;)

Posted by member 7 on 2003-04-11 06:05:34 link

TucknDar: try .extract for the icon thingy

Posted by member 333 on 2003-04-11 06:09:18 link

yeah, I've tried that.. I'll do it again, and maybe it was just a stupid mistype, like most of the supposed "feature-limits" are ;)

Posted by member 12135 on 2003-04-11 06:55:43 link

hmm, i tried how you said and it didnt work :/
for some stupid reason it just wont hide the buggers :/

Posted by member 333 on 2003-04-11 07:49:14 link

odd... is it still showing dispbg2.bmp when hovering? Try explaining it one more time, maybe I'm just thick ;)

Posted by member 333 on 2003-04-11 08:23:31 link

ok, I'm taking at look at disp.box and the relevant images...

It looks to me like pagedown.bmp doesn't stay on top of dispbgx.bmp, which means that by clicking it, you're actually clicking the background, if you understand what I mean. Maybe it would work if you make the triangle-area of dispbgx.bmp magic pink. I'm not sure, but I think that this will help in keeping pagedown.bmp "on top" so to speak.

ps. by looking at the tooltip while hovering over the triangle, you'll easily find out whether it is actually showing through or not.

Posted by member 562 on 2003-04-11 11:49:01 link

try !Execute [!LSBoxGroupShow 9] [!LSBoxGroupHide 1]