locked
LD-Extention: LDUtilities.ColourList() RRS feed

  • Question

  • The first colour in the list is "'Tranparent". But it is no reaction in the program XNT105 if i use this colour. Can you help me?

    Best Regards Martin

    Saturday, February 15, 2014 8:13 PM

Answers

  • Hallo Martin,

    wenn Du mit einer einzelnen Shape auskommst, kannst Du zB. auch LDShapes.BrushColour verwenden in der Art:

    GraphicsWindow.Top = 1
    GraphicsWindow.Left = 1
    gw = Desktop.Width - 14
    gh = Desktop.Height - 96
    GraphicsWindow.Width = gw
    GraphicsWindow.Height = gh
    GraphicsWindow.BackgroundColor = "SteelBlue"
    arr_colours = LDUtilities.ColourList()
    sha_listbox = LDControls.AddListBox(arr_colours, 200, gh - 24)
    
    LDControls.ListBoxSelect(sha_listbox,2)
    sha_rectangle = Shapes.AddRectangle(gw-300, gh-100)
    Shapes.Move(sha_rectangle, 250, 50)
    
    F = "False"
    T = "True"
    number = 1
    oldnumber = 1
    EndMain = F
    
    While EndMain = F
      number = LDControls.LastListBoxIndex
      If number <> oldnumber Then 
        oldnumber = number
       LDShapes.BrushColour(sha_rectangle,arr_colours[number])
      EndIf
    EndWhile

    Transparenz ist dann gut zu erkennen.

    Engl:

    If you only need a single shape, you can also use LDShapes.BrushColour, like ...

    [... CODE ...]

    Transparency is good viewable then.


    • Edited by Pappa LapubEditor Saturday, February 15, 2014 10:36 PM
    • Marked as answer by martmen Sunday, February 16, 2014 5:16 PM
    Saturday, February 15, 2014 10:35 PM
    Answerer

All replies

  • The Transparent colour is "#00FFFFFF".  See here.

    So when you create a new rectangle shape with this colour you can't see it!  It doesn't make the surface it is drawn on transparent unfortunately.

    Saturday, February 15, 2014 9:06 PM
  • Martmen,

    If you insert the lines below in your program you'll see that when "transparent" is chosen that it is actually working for you.  I just set it up to remove the shape when chosen to show that it works.

    While EndMain = F
      number = LDControls.LastListBoxIndex
      If number=1 Then
        Shapes.Remove(sha_rectangle)
       endif 
      If number <> oldnumber Then 


    JR

    Saturday, February 15, 2014 9:28 PM
    Answerer
  • Hallo Martin,

    wenn Du mit einer einzelnen Shape auskommst, kannst Du zB. auch LDShapes.BrushColour verwenden in der Art:

    GraphicsWindow.Top = 1
    GraphicsWindow.Left = 1
    gw = Desktop.Width - 14
    gh = Desktop.Height - 96
    GraphicsWindow.Width = gw
    GraphicsWindow.Height = gh
    GraphicsWindow.BackgroundColor = "SteelBlue"
    arr_colours = LDUtilities.ColourList()
    sha_listbox = LDControls.AddListBox(arr_colours, 200, gh - 24)
    
    LDControls.ListBoxSelect(sha_listbox,2)
    sha_rectangle = Shapes.AddRectangle(gw-300, gh-100)
    Shapes.Move(sha_rectangle, 250, 50)
    
    F = "False"
    T = "True"
    number = 1
    oldnumber = 1
    EndMain = F
    
    While EndMain = F
      number = LDControls.LastListBoxIndex
      If number <> oldnumber Then 
        oldnumber = number
       LDShapes.BrushColour(sha_rectangle,arr_colours[number])
      EndIf
    EndWhile

    Transparenz ist dann gut zu erkennen.

    Engl:

    If you only need a single shape, you can also use LDShapes.BrushColour, like ...

    [... CODE ...]

    Transparency is good viewable then.


    • Edited by Pappa LapubEditor Saturday, February 15, 2014 10:36 PM
    • Marked as answer by martmen Sunday, February 16, 2014 5:16 PM
    Saturday, February 15, 2014 10:35 PM
    Answerer
  • Danke Pappa Lapub, das ist die Anwort, die ich brauchte. Habe das Programm noch etwas geändert und unter TQN532 veröffentlicht.

    Thank you Pappa Lapub, this is the answer if i needed. Export the Program new with TQN532.

    Sorry for my bad english.


    Best Regards Martin

    Sunday, February 16, 2014 5:16 PM