ColorDialogColor
ColorDialogColor Index, Color
 
Parameters:

    Index=the custom color index from 1 to 16
    Color=the color for the index
Returns: NONE
 

     ColorDialogColor sets the custom color of a slot in the Color Dialog. There are 16 slots numbered from 1 to 16.




FACTS:


      * The color are required to be in 24 bit RGB format.



Mini Tutorial:


     


  
; Include the Dialogs library in this program
  #Include "PBDialogs2"
  
  
; Init the Colour Palette of the Colour Dialog
  For lp=0 To 16
     ColorDialogColor(lp,RndRGB())
  Next
  
; Open the Colour Selection Dialog
  ThisColour=ColorDialog(RGB(255,255,255))
  
  If ThisColour<>-1
     
   ; Display message
     CenterText 400,180,"Here's your colour"
     BoxC 300,200,500,400,true,ThisColour
     
  Else
     CenterText 400,180,"You Pressed Cancel"
     
  EndIf
  
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKeykey
  




 
Related Info: ColorDialog | GetColorDialogColor | RGB :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com