Jump to content
Sign in to follow this  
tobibo

Create ColorButton

Recommended Posts

how do i create a color button????

in the vs function reference there is the possibility to SetColorButton an GetColorButton, but i see no way to create a color button!!! a system color palette seems to be something different!?

Share this post


Link to post

Hi,

GetColorButton & SetColorButton work with the system color palette control:

PROCEDURE MoreDocumentation;

VAR

dialogID : LONGINT;

red, green, blue : LONGINT;

PROCEDURE HandleColourPicker(VAR item : LONGINT; data : LONGINT);

BEGIN

CASE item OF

SetupDialogC: BEGIN

SetColorButton(dialogID, 10, 65535, 0, 0);

END;

10: BEGIN

GetColorButton(dialogID, 10, red, green, blue);

RGBToColorIndex(red, green, blue, gColour);

END;

END;

END;

BEGIN

dialogID := CreateLayout('Colour Picker', FALSE, 'Ok', 'Cancel');

CreateControl(dialogID, 10, 2, 'Colour', 2);

SetFirstLayoutItem(dialogID, 10);

IF RunLayoutDialog(dialogID, HandleColourPicker)=0 THEN BEGIN END;

AlrtDialog(Num2Strf(gColour));

END;

Regards,

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...