Home » Developer & Programmer » Forms » color picker in form 6i (form 6i)
color picker in form 6i [message #392722] Thu, 19 March 2009 01:23 Go to next message
rhnshk
Messages: 26
Registered: May 2008
Junior Member
i have item_master form where in i enter product specifications.
theres is one text_item to enter color of the product i want to put a button next to the field, when it is pressed a color pallatte should appear like how we have in the form builder. user will get chance to see the color and pick of his choice.whichever color gets selected,the text_item background should get filled with that color or the color name should appear in its own color in the text_item.

i can see i nice color List item above, when i am filling this post. can a list item designed like this be possible in form6i. where all color names get displayed in their own color?

i would be greatful if someone suggest me the steps for doing this and helps me with the code. TYVM
Re: color picker in form 6i [message #392767 is a reply to message #392722] Thu, 19 March 2009 04:18 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you read this discussion? Perhaps you could contact the original poster and see what has he done about it.
Re: color picker in form 6i [message #393393 is a reply to message #392722] Sun, 22 March 2009 09:24 Go to previous messageGo to next message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

well i used a color picker in forms 6i using win apis provided by d2kwutil package.

pls serach and u'll find. if u fail, then let me know i'll provide u the necessary files and a pesonaly created program unit code that will help u to use it multiple times.
Re: color picker in form 6i [message #394656 is a reply to message #393393] Sun, 29 March 2009 10:56 Go to previous messageGo to next message
rhnshk
Messages: 26
Registered: May 2008
Junior Member
Thank you so much my friend. i have d/l this "d2kwutil_6_0_6_0.zip"
but find a bit not-easy to install those components into my application. can u show some easy to follow steps. so that in future i can use any of the WINAPI feature without a Fuss. the main i require now is te he solor picker.

regards
Re: color picker in form 6i [message #395546 is a reply to message #394656] Wed, 01 April 2009 18:09 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: color picker in form 6i [message #395823 is a reply to message #395546] Thu, 02 April 2009 13:16 Go to previous messageGo to next message
rhnshk
Messages: 26
Registered: May 2008
Junior Member
no still.
Re: color picker in form 6i [message #396141 is a reply to message #392722] Sat, 04 April 2009 05:15 Go to previous message
itech
Messages: 173
Registered: May 2008
Location: Fsd, Pakistan
Senior Member

pls download the attached file and change the extention to zip,
unzip the file and run the wapidemo.fmx (Windows API Demo)from the same directory (i.e. use open with , and select forms runtime, as it requires current directory path to run correctly)

in dialog functions tree item, there is a option choose_color


======
Choose_Color pops up the standard color selection dialog, and allows the user to select a color.

Arguments:
<Red> A PLS_INTEGER variable to take the degree of Red-ness of the selected color. If you initialise this variable with a value, then the dialog will display this value as an initial selection
<Green> A PLS_INTEGER variable to take the degree of Green-ness of the selected color. If you initialise this variable with a value, then the dialog will display this value as an initial selection
<Blue> A PLS_INTEGER variable to take the degree of Blue-ness of the selected color. If you initialise this variable with a value, then the dialog will display this value as an initial selection
<RaiseExceptions> TRUE or FALSE(Default) If set to TRUE, then if the dialog is cancelled, the explicit PL/SQL exception NO_DATA_FOUND will be raised.

The function returns an integer value which reflects the combined RGB value.

============
sample code.
/*-- Sample Generated Code --*/
declare
 iRed PLS_INTEGER := 128;
 iGreen PLS_INTEGER := 0;
 iBlue PLS_INTEGER := 255;
 iResult PLS_INTEGER;
begin
 iResult:= Win_API_Dialog.Choose_Color( iRed, iGreen, iBlue, TRUE);
 ...
end;


===========================
then use

set_item_property(itname,BACKGROUND_COLOR,'r255g255b255');


replace the last color code r255g255b255 with those picked in the color dialog.

Previous Topic: populate_list
Next Topic: how to get IP ADDRESS of server machine
Goto Forum:
  


Current Time: Mon Feb 03 20:35:57 CST 2025