Advertisement
ChaosHacks

Untitled

Mar 9th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. local panel = MainForm.Panel5
  2. img = createImage(panel)
  3. img.loadImageFromFile("autorun\\logo.png")
  4. img.Align = alNone
  5. img.Stretch = true
  6. img.Anchors = '[akRight,akBottom]'
  7. img.AnchorSideRight.Control = img.Parent
  8. img.AnchorSideRight.Side = asrRight
  9. img.AnchorSideBottom.Control = MainForm.btnAddAddressManually
  10. img.AnchorSideBottom.Side = asrBottom
  11. img.BorderSpacing.Around = 5
  12.  
  13. -- try to determine how much space is actually there and fit in it
  14. local t = createTimer()
  15. t.Interval = 100
  16. t.OnTimer = function(t)
  17. local p = MainForm.Panel8 -- alignment/lastdigits
  18. local minx = p.clientToScreen(p.ClientWidth+15, 0)
  19. local maxx = MainForm.clientToScreen(MainForm.ClientWidth, 0)
  20. local width = maxx - minx
  21. if not width then return end -- gui probably isn't visible yet so just wait
  22. img.Width = width
  23. t.destroy() -- and done
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement