SetRebarUserCallback

www.progui.co.uk  Top  Previous  Next

SetRebarUserCallback()

Syntax

*oldCallback = SetRebarUserCallback(Rebar.i, *UserCallback)

Description

 

Sets a Rebar's user callback procedure, used for notification of when a Rebar is updated or height changes.

 

Rebar.i is the ID/Handle of the rebar. *UserCallBack must point to a procedure in your code with the following structure: -

 

Procedure myRebarCallback(window, message, wParam, lParam)

 

  Select message

 

    Case #REBAR_UPDATED

 

      ResizeGadget(gadget, 0, wParam, WindowWidth(#Window_0), WindowHeight(#Window_0)-wParam)

 

  EndSelect

 

EndProcedure

 

Whenever the Rebar is updated ProGUI will send a #REBAR_UPDATED event message to the user callback. The wParam contains the new height of the Rebar and the lParam contains a handle to the Rebar that triggered the event.

 

Returns a pointer to the old user callback (zero if there wasn't one) or -1 for failure.

 

Rebar Index