Posted: Sat Mar 23, 2019 1:32 am Post subject: Sharing : CEPanel As Hi-Light Bar Cursor
This is a simple script for implementing CEPanel as a hi-light bar cursor when entering to a selected object or text.
Code:
-- =================================================== --
-- Custom Text Hi-light Bar via CEPanel Manipulation --
-- Author : Corroder --
-- Date : March 22, 2019 --
-- Desc. : Sample for implementation CEPanel as --
-- Hi-light Bar when enter an object / text --
-- =================================================== --
------------------------------------------------------ Make Functions
function pCursorIn(sender) --- Show Hi-light Panel Bar when mouse enter the object
p.visible = true
p.caption = sender.Caption
p.top = sender.top + 2
p.height = sender.height + 2
p.color = '0x87CEEB'
p.Font.Name = sender.Font.Name
p.Font.Size = sender.Font.Size
sender.sendToBack()
end
function pCursorOut(sender) -- Hide Hi-light Panel Bar when mouse left the object
if not sender then
sender.visible = true
sender.bringToFront()
p.visible = false
end
end
function formEnter() -- Normalize Form GUI and Hi-light Panel Bar
p.visible = false
end
function labelClicked() -- Do something when Hi-light Panel Bar has clicked
print(p.Caption..' has been clicked')
end
function exiter() -- close CE and clear memory
closeCE()
return caFree
end
note = [[ If you have created objects/texts selection which over than 5,
it is better considering to make your object using global name and
call the event handler using global function ]]
Hope you can develop this method for the better. Good luck... _________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum