Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / Object / qcolordialog.html

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Appendix A: QColorDialog  
Documentation component by D.Glodt (c)2000-2001 Appendix A: QColorDialog

QColorDialog Component

QColorDialog is a dialogue box used to select a color.

          WARNING:don't use Caption property with an other component using a WindowProc.

QColorDialog Properties

Field Type R/W Default




Caption STRING RW
Colors Array of LONG RW
Define the value of 16 colors perso. 
Color LONG R
Value color selected. 
Style INTEGER RW cdNormal
Style dialog box, can be cdFullOpen or cdNoFullOpen

QColorDialog Methods

Method Type Description Params




Execute FUNCTION Open the dialog box , return True if color selection

QColorDialog Events

Event Type Occurs when... Params




QColorDialog Examples

' Color chooser dialog example
$INCLUDE "RAPIDQ.INC"
$INCLUDE "QCOLORDIALOG.INC"
$TYPECHECK ON

DECLARE SUB ButtonClick (Sender AS QBUTTON)

dim Dial as QColorDialog
    Dial.Style=cdNoFullOpen
    Dial.Caption="Select Color"

CREATE Form AS QFORM
    CREATE Button AS QBUTTON
        Width = 100
        Caption = "Choose color"
        OnClick = ButtonClick
    END CREATE
    Center
END CREATE
form.ShowModal


SUB ButtonClick (Sender AS BUTTON)
    if Dial.Execute then
      Form.Color=Dial.Color
    end if
END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2024-4-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-02-09 18:56:36