October 28, 2020, 05:40:09 AM

Author Topic: [bb] Group Boxes by kfprimm [ 1+ years ago ]  (Read 1152 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Group Boxes by kfprimm [ 1+ years ago ]
« on: June 29, 2017, 12:28:43 AM »
Title : Group Boxes
Author : kfprimm
Posted : 1+ years ago

Description : Creates groupboxes that don't cause slow downs in programs....i think.

Code :
Code: BlitzBasic
  1. Function CreateGroupBox(txt$,x,y,width,height,group)
  2. outline=CreateImage(width,height)
  3. SetBuffer ImageBuffer(outline)
  4. font=LoadFont("Arial",14)
  5. SetFont font
  6. ClsColor 236,233,216
  7. Cls
  8. Color 153,84,10
  9.  
  10. Text 10,4,txt$,False,True
  11. Color 209,209,192
  12. Line 2,4,6,4
  13. Line 10+StringWidth(txt$)+2,4,width-3,4
  14. Plot 2,5
  15. Plot 1,5
  16. Plot 1,6
  17. Plot width-3,5
  18. Plot width-2,5
  19. Plot width-2,6
  20. Line width-1,6,width-1,height-3
  21. Plot width-2,height-3
  22. Plot width-2,height-2
  23. Plot width-3,height-2
  24. Line width-3,height-1,2,height-1
  25. Plot 2,height-2
  26. Plot 1,height-2
  27. Plot 1,height-3
  28. Line 0,height-3,0,6
  29. SaveImage outline,"outline.bmp"
  30. FreeImage outline
  31. Local can=CreateCanvas(1025,0,1,1,group)
  32. SetBuffer CanvasBuffer(can)
  33. Local outlinepan=CreatePanel(x,y,width,height,group)
  34. SetPanelImage outlinepan,"outline.bmp"
  35. DeleteFile "outline.bmp"
  36. Local pan=CreatePanel(2,9,width-4,height-11,outlinepan)
  37. FreeFont font
  38. Return pan
  39. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal