tobibo Posted March 12, 2004 Share Posted March 12, 2004 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!? Quote Link to comment
sean_aeronaut Posted June 16, 2004 Share Posted June 16, 2004 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, Quote Link to comment
Recommended Posts
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.