func_maxgui_labels_createlabel.rst 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .. _func_maxgui_labels_createlabel:
  2. ===========
  3. CreateLabel
  4. ===========
  5. CreateLabel -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. CreateLabel:TGadget(name$,x,y,w,h,group:TGadget,style=LABEL_LEFT)
  10. Create a Label gadget.
  11. A Label gadget is used to place static text or frames in a MaxGUI user interface. They do not
  12. generate any events.
  13. Labels support these optional styles:
  14. [ @Style | @Meaning
  15. * LABEL_FRAME | The label has a simple border.
  16. * LABEL_SUNKENFRAME | The label has a sunken border.
  17. * LABEL_SEPARATOR | The label is an etched box with no text useful for drawing separators.
  18. * LABEL_LEFT | The label's text is left-aligned. This is the default.
  19. * LABEL_CENTER | The label's text is center-aligned.
  20. * LABEL_RIGHT | The label's text is right-aligned.
  21. ]
  22. See Also: #SetGadgetText, #SetGadgetTextColor, #SetGadgetFont and #SetGadgetColor.
  23. Parameters
  24. ==========
  25. Return Values
  26. =============
  27. Nothing.
  28. Examples
  29. ========
  30. .. code-block:: blitzmax
  31. ' createlabel.bmx
  32. Import MaxGui.Drivers
  33. Strict
  34. Local window:TGadget
  35. window=CreateWindow("My Window",30,20,320,480)
  36. CreateLabel("A plain label",10,10,280,52,window)
  37. CreateLabel("A label with LABEL_FRAME",10,80,280,60,window,LABEL_FRAME)
  38. CreateLabel("A label with LABEL_SUNKENFRAME",10,150,280,60,window,LABEL_SUNKENFRAME)
  39. CreateLabel("not applicable",10,220,280,54,window,LABEL_SEPARATOR)
  40. While WaitEvent()<>EVENT_WINDOWCLOSE
  41. Wend
  42. See Also
  43. ========