reload buttons via script?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
reload buttons via script?
Hi,
got a (hopefully) simple question:
I got a skinned button. The icons are imported on a substack. But if I exchange the IDs of the imported images (on the substack) - the icon of the buttons in the current stack wont change inmedently - first I have to hover above the buttons.
Is there a way to "reload" the buttons, so they change their skin? Or maybe is there a message I could send to the buttons?
Thanks alot
got a (hopefully) simple question:
I got a skinned button. The icons are imported on a substack. But if I exchange the IDs of the imported images (on the substack) - the icon of the buttons in the current stack wont change inmedently - first I have to hover above the buttons.
Is there a way to "reload" the buttons, so they change their skin? Or maybe is there a message I could send to the buttons?
Thanks alot
Re: reload buttons via script?
Hi Tomka,
you could try:
...
lock screen
## do your skinning stuff
## ...
unlock screen
...
That should work.
Best
Klaus
you could try:
...
lock screen
## do your skinning stuff
## ...
unlock screen
...
That should work.
Best
Klaus
Re: reload buttons via script?
I'm sad because it doesnt...
The button is shown with the old skin-image until I hover with mouse over it.
Maybe I should reload the whole stack but it will makes it a bit more difficult
The button is shown with the old skin-image until I hover with mouse over it.
Maybe I should reload the whole stack but it will makes it a bit more difficult

Re: reload buttons via script?
Hi Tomka,
hm... damn!
OK, reloading the stack is also not the solution.
I presume you are just setting the icons to the new image ids right?
Sorry, no idea so far...
Best
Klaus
hm... damn!
OK, reloading the stack is also not the solution.
I presume you are just setting the icons to the new image ids right?
Sorry, no idea so far...
Best
Klaus
Re: reload buttons via script?
Hi,
I dont change anything on the button-proporties. I exchange the IDs of the 2 imported images
I dont change anything on the button-proporties. I exchange the IDs of the 2 imported images

Re: reload buttons via script?
Hä???
How do you exspect the button to know about that fact?
How do you exspect the button to know about that fact?

Re: reload buttons via script?
Ok let me explain 
For example "button 1": the setting for icon=1007 (property-inspector). The image1 with ID 1007 is an image imported as control on a substack.
If the user changes the language of the program the script will change ID of those image1 to <xyz> (any unused ID) and then the ID of the second image2 to 1007.
If the user changes the language again the script will set the ID of image1 back to 1007
It really works good but the great problem is that the user have first to mouseover the buttons to see the new skin.

For example "button 1": the setting for icon=1007 (property-inspector). The image1 with ID 1007 is an image imported as control on a substack.
If the user changes the language of the program the script will change ID of those image1 to <xyz> (any unused ID) and then the ID of the second image2 to 1007.
If the user changes the language again the script will set the ID of image1 back to 1007

It really works good but the great problem is that the user have first to mouseover the buttons to see the new skin.
Re: reload buttons via script?
AHA!
But I have still no idea how to solve this problem.
Any chance that you do NOT change the image IDs, which is an erm... rather unusual approach
but only set the icons of your buttons? I am sure that will work fine.
Best
Klaus

But I have still no idea how to solve this problem.
Any chance that you do NOT change the image IDs, which is an erm... rather unusual approach

but only set the icons of your buttons? I am sure that will work fine.
Best
Klaus
Re: reload buttons via script?
Hi Tomka,
you could try to:
do it twice to restore the hilite before the command.
It seems to work
Kind regards
Bernd
you could try to:
Code: Select all
set the hilite of btn "b1" to not the hilite of btn "b1"
set the hilite of btn "b1" to not the hilite of btn "b1"
It seems to work
Kind regards
Bernd
Re: reload buttons via script?
@Klaus:
It would makes it more difficult because I also use a substack which is not loaded when the user can change the language. So I dont need to add anything in its preopenstack-script. Its all done with the script in the 2 buttons.
@Bernd:
It works great! Thats what I was looking for. Great thx!
It would makes it more difficult because I also use a substack which is not loaded when the user can change the language. So I dont need to add anything in its preopenstack-script. Its all done with the script in the 2 buttons.
@Bernd:
It works great! Thats what I was looking for. Great thx!
Re: reload buttons via script?
Hi Jungs,
aha, wieder was gelernt
Best
Klaus
aha, wieder was gelernt

Best
Klaus
Re: reload buttons via script?
Tomka,
it wasn't after Klaus asked for what exactly it was you wanted that I understood what you were trying to do. It might help to explain a little what you want to do in the first place
Kind regards
Bernd
it wasn't after Klaus asked for what exactly it was you wanted that I understood what you were trying to do. It might help to explain a little what you want to do in the first place

Kind regards
Bernd
Re: reload buttons via script?
Das ist hier im Forum aber eigentlich nicht üblich!bn wrote:... It might help to explain a little what you want to do in the first place![]()

Re: reload buttons via script?
Next time ill try to explain better
...
