SetColourDialogPalette
SetColourDialogPalette Index, ThisColour
 
Parameters:

    Index = Index of the colour to change (0 to 15)
    ThisColour = The RGB colour value
Returns: NONE
 

     SetColourDialogPalette command sets an individual colour in the colour selection dialogs internal palette. The dialog holds 16 custom colours.




FACTS:


      * The SetColourDialogPalette expects colours in RGB format (24bit).




 
Example Source: Download This Example
; Include the Dialogs library in this program
  #Include "PBDialogs"
  
; Init the Colour Palette of the Colour Dialog
  For lp=0 To 16
     SetColourDialogColour(lp,RndRGB())
  Next
  
; Open the Colour Selection Dialog
  ThisColour=ColourDialog(RGB(255,255,255))
  
  If ThisColour<>-1
     
   ; Display message
     Text 0,0"Here's your colour"
     BoxC 0,20,50,70,true,ThisColour
     
     
     Text 0,90,"Colour Dialogs Palette"
     For lp=0 To 15
        
        X1=lp*50
        X2=X1+50
        y1= 120
        Y2=Y1+50
        BoxC x1,y1,x2,y2,true,GetColourDialogColour(lp)
        
     Next
     
     
  Else
     Print "You Pressed Cancel"
     
  EndIf
  
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKey
  
  
  
  
  
  
 
Related Info: ColourDialog | FolderDialog | LoadDialog | SaveDialog :
 


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