Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 15 FEB 1998 07:14:14PM Barry Stevens wrote:

I cannot get the IMAGENUMBER to set in a PushButton bitmap control.

I am trying to implement AMcK code for an amimated button, but cant get it to work. I narrowed it down to the imagenumber not setting.

if I do the following test, no value is returned and frame is not changed.

.BMP_LOGO-]IMAGENUMBER=2

RetVal=.BMP_LOGO-]IMAGENUMBER

call msg(@Window,RetVal)

*Retval returns blank

Any clues as to what could be wrong

Barry


At 16 FEB 1998 04:53AM Carl Pates wrote:

Barry,

AFAIK ( and I've tried ) you can't set the ImageNumber property for a PUSHBMP type control, as this is set as a representation of the button's current state. Because the image represents the whole of the button, and not just a small glyph ( as in Delphi for example ) it has to show the button's current state to the user and therefore it makes no 'sense' to be able to change it's appearance at will.

However, having said that I would prefer to be given the option to do this myself as I have needed something similar in the past!

You could try changing the BITMAP in response to the TIMER property I suppose…. and see how you go from there..

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft (Except VIP)


At 16 FEB 1998 07:21AM Barry Stevens wrote:

Carl.

This is what Andrew gave me.

If you can ask him how it is supposed to work, let me know.

.. used with a yield()

Timer:

CtrlArray=AtWindow : ".BMP_LOGO"

PropArray=IMAGENUMBER"

CtrlArray := @Rm : AtWindow

PropArray := @Rm : "@DIRECTION"

CtrlArray := @Rm : AtWindow : ".BMP_LOGO"

PropArray := @Rm : "IMAGECOUNT"

DataArray=Get_Property(CtrlArray,PropArray)

ImageNumber=DataArray1,@Rm

Direction=DataArrayCol2()+1,@Rm

ImageCount=DataArrayCOl2()+1,@Rm

Begin Case

Case ImageNumber=1

ImageNumber += 1

Direction=0

Case ImageNumber=ImageCount

ImageNumber -=1

Direction=1

Case 1

If Direction Then

ImageNumber -= 1

End Else

ImageNumber += 1

End

End Case

CtrlArray=AtWindow : ".BMP_LOGO"

PropArray=IMAGENUMBER"

DataArray=ImageNumber

CtrlArray := @Rm : AtWindow

PropArray := @Rm : "@DIRECTION"

DataArray := @Rm : Direction

DataArray=Set_Property(CtrlArray,PropArray,DataArray)

Return

***

regards

Barry


At 16 FEB 1998 07:23AM Cameron Revelation wrote:

Barry,

Make it a check-box and set value to toggle it. The IMAGENUMBER property is only for BITMAP controls.

Cameron Purdy

Revelation Software


At 16 FEB 1998 10:55AM Don Bakke wrote:

Barry,

I'm very certain Carl is aware of the code you posted (heck, he may have written it originally). But this code was meant for what seems to be a Bitmap control.

The fog is still in my eyes a bit (from a very restless sleep) so I will come back if I have a really good idea. However, one thought is that you use a Bitmap control, since it allows you to control which image to display, and then trap a left mouse click to simulate a button.

Another idea is to use a button but create multiple BMP's that represent the "animated" sequence you want. Then use the BITMAP property to swap them out. The code Andrew gave you should probably work but you would replace the general use of IMAGENUMBER with the BITMAP property.

dbakke@srpcs.com

SRP Computer Solutions

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/3c9cd400397741e3852565ad00014da6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1