Change the color of text item after execute query
Dear friends
I would like to know how can I make a tabular form like grid and chang the color of text item when (for exp in emp table) the value of sal column between 2000$ and 4000$.
I used the SE_IEM_PROPERTY command but it change all of the text items of sal column.
please help me
thanks a lot
Highlight the Existing Record in Forms
(Compatible with 4.x, 5.x, 6.x & 9i)
Step 1: Create a New Visual Attribute(BLUE_VA) (Color of highlighted record)
Font â Arial
Size â 8
Style â Plain
Font width - Normal
Font Weight - Bold
Foreground Color â Black
Background Color â Blue
Fill Pattern â Transparent
Step 2: Create another Visual Attribute (WHITE_VA) (Default Color of the record)
Font â Arial
Size â 8
Style â Plain
Font width - Normal
Font Weight - Bold
Foreground Color â Black
Background Color â White
Fill Pattern â Transparent
Step 3: Add Following code to Block-level Trigger WHEN-NEW-RECORD- INSTANCE, POST-BLOCK
(Add to the block, which has these records)
-- Following code will only highlight an item
DISPLAY_ITEM(<block_name>.<item_name>,'BLUE_VA');
-- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Display_Item( cur_itm, 'BLUE_VA');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
Step 4: Add Following code to Block-level Trigger PRE-RECORD, PRE-BLOCK
(Add to the block, which has these records)
-- Following code will only highlight an item
DISPLAY_ITEM(<block_name>.<item_name>,'WHITE_VA');
-- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Display_Item( cur_itm, 'WHITE_VA');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
I am using the above code in one of my forms and I so far haven't seen any problem
Similar Messages
-
How do I change the color of text in Messages?
How do I change the color of text in Messages? It was easy to do before, but I can't seem to find it after the upgrade.. is it a hidden menu option? The gray text is really annoying.
Two possible ways are available
Set the text with and html text string like "<html><font color-red>" + text + "</font></html>"
or get the cellrenderer, cast to the DefaultCellRenderer and call setForeground or background or implement or your own cellrenderer to do the custom coloring (this could maybe depend on indexes)
ICE -
When I receive, reply or compose email. I no longer am able to see or change the color of text. I select to change the text from black to Red (or any other color) and the text just stays black, The color seletor box will show the last select color, but never actually changes the text color in an email. Also in received email, when the sender has indicated their replies to me are in another color, All the text only appears as black. I never had this problem in the past, not sure what has happened. I did restart Thunderbird with add-ons disabled and this did not change the problem.
Hello, maybe the question need to move by a moderator to thunderbird support ?
https://support.mozilla.org/en-US/questions/thunderbird?owner=all
thank you
[moderator note: question thread has been moved from Firefox queue to Thunderbird queue] -
How do you change the color of text messages?
Can you change the color of text messages? If so, how?
Two colors. Blue and green.
Green is for text message. Blue is for iMessage. You can't change these, though. -
You cannot change the price of an item AFTER I check out!
I ordered an XMEN: Days of Future Past box set with a robot head last night for $17.99 plus tax for store pickup online. The total came out to be a bit over $20. When I checked my email today, I was charged $29.99 for the item, and tax based on the new sale price. This is an increase of more than 50%!
It is not legal to change the price of an item AFTER a price is agreed and someone has paid. I would like someone to fix this, as this is a big deal for your customers.
I would like to know what Best Buy can do about this issue? I live in Minneapolis, and would like to believe that our local businesses aren't cheating their customers, especially those in their hometown.Greetings Kylearin,
I can imagine why you'd be concerned! I'd be surprised too if a price I saw during checkout was not reflected in my order confirmation page.
I've had the chance to review your account and it appears that your order for X-Men: Days of Future Past was submitted on 11/26/2014, shortly after midnight. Since this particular movie was a Deal of the Day item on 11/25 -- and since your order was not received while the lower sale price was in effect -- the price reflected on your order is correct. It's unfortunate if this does not meet your expectations, but remember that you may always cancel your order if you'd like by signing into your account on BestBuy.com.
BestBuy.com > Help Center > Cancel Your Order
http://bbyurl.us/ModifyingOrders
Thanks for your understanding, as well as for taking the time to post.
Aaron|Social Media Specialist | Best Buy® Corporate
Private Message -
May I know how to change the color of texts inside the indicator box?
Can anyone tell me how to change the color of texts inside the indicator box? I have tried to use property node but not really know how it functions.
In fact, I am writing a program for which the number inside indicator on front panel will show red color if the measured value can't reach the requirement. I am using LabView 6.1 Professional
Thank You for your attention!!!!!!Simply use a property node with "NumText.TextColor" and wire the correct color depending on your test result.
The attached simple example (LV 6.1) lets you change it from the front panel. In your case, you would use your test output instead of a FP switch, of course. Message Edited by altenbach on 05-25-2005 09:05 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
TextColor.vi 18 KB -
Tabular Forms - how to change the color of text when the field is disabled
Hi,
I have a tabular form and some of it's columns are disabled showing text in grey color...
is there a way to change the color to black and bold the text...?
thanksOkay, i've taken a look at your example.
The column formatting does not work on the input fields. The help on the item says that it generates a span with a style attribute. This would work for a display field, not for an input field.
Css like i've written should be in the style tags, put up in the header section of the page (page -> edit -> header region).
You've already put script tags there, the style tags go there aswell. You shouldn't even need to put your script tags in the header region. Just put your code up in the javascript functions region (without the script tags).
However, i tested in firefox and here color works on an input field, changing the font color. In IE it does not do this. Cross browser implementations and such, not much to do about it here. See http://stackoverflow.com/questions/602070/changing-font-colour-in-textboxes-in-ie-which-are-disabled.
I did notice that you build your form with a bunch of input fields, which you disable through javascript in the footer of the region. Then on submit, you set the disabled to false again for all those fields! If you want those fields to always be submitted to the server, why wouldn't you use the readonly attribute? Readonly fields are always submitted, and can't be edited by the user. Plus, readonly fields CAN be styled however you want! You can get rid of the javascript code in your header then.
Even the javascript in the footer is not necessary. If you just add 'readonly="true"' (without single quotes) to the element attributes of your items (edit column -> column attributes region) = no javascript at all (less maintenance). -
The color of text item with multi-line in web
I tried to change the background color of text item with multi-
line, but it does not work when I run in the web, if some body
knows that, please give a hint.
Thanks
Frank
nullI tried to change the background color of text item with multi-
line, but it does not work when I run in the web, if some body
knows that, please give a hint.
Thanks
Frank
null -
Can't change the color of text of links on my Welcome Page
I have a Welcome page with four links that happen to be text that I dragged over from my list of sites. I can change the text style and size but I cannot change the color from the default reddish brown.
To change the color of any hyperlinks, you need to select the link, go to the Hyperlink page, choose the Format option, and then select the color you want for Normal, Rollover, Visited and Disabled.
This should work.
You can also set the default colors and formats you want for all other entries on that same page. -
I have tried everything! How to change the color of text based on value Acrobat 9
How can I change the color of the text to red if the value is "Unacceptable" and leave it green for all other rating values? Where can I put it for it to work? Also, Unacceptable is set to an export value of 0.
var n = +this.getField("NumericSummaryRating").value;
var a = +this.getField("Rating1.0").value;
var b = +this.getField("Rating1.1").value;
var c = +this.getField("Rating1.2").value;
var d = +this.getField("Rating1.3").value;
var e = +this.getField("Rating1.4").value;
if (n == 0) {
event.value = "Not Rated";
} else {
if (a==0 || b==0 || c==0 || d==0 || e==0) {
event.value = "Unacceptable";
else {
if (n>0 && n < 3.0){
event.value = "Unacceptable";
else if (n >= 3.0 && n < 3.6) {
event.value = "Successful";
else if (n >= 3.6 && n < 4.6) {
event.value = "Excellent";
else if (n >= 4.6) {
event.value = "Outstanding";You can add this at the end of the code:
if (event.value=="Unacceptable") event.target.textColor = color.red;
else event.target.textColor = color.green; -
How to change the color of text to an swf file
Hello:
In a menu of four options (each option is only text) I would
like to change
the color of the text that is clicked., the menu is a group.
Can you hep me
please?
thank youAnne wrote:
> Hello:
> In a menu of four options (each option is only text) I
would like to change
> the color of the text that is clicked., the menu is a
group. Can you hep me
> please?
> thank you
>
>
Assuming each option is an individual text member in its own
sprite...
on mouseEnter me
cursor 280
sprite(the currentSpriteNum).color = rgb(255,0,0)
end
on mouseLeave me
cursor -1
sprite(the currentSpriteNum).color = rgb(0,0,102)
end
on mouseDown me
sprite(the currentSpriteNum).color = rgb(0,0,0)
end
on mouseUp me
cursor -1
sprite(the currentSpriteNum).color = rgb(0,0,102)
go to frame "StartMovie" of movie "Chapter1" -- or whatever
you want
to do here
end -
How to change the color of text in Teat Area
Pls tell me how can i print two different lines in two different colors inside the same text area.
Because whenever i set the color it sets the color for the complete text area.
I want to print "Hello..." with color red and "Hi..." with color green in the same text area.
Pls help me out...hi,
u should use swing component JTextPane instead of textarea to change the color of the text.
for eg:
JTextPane textPane;
JScrollPane panescrollpane;
textPane=new JTextPane();
panescrollpane=new JScrollPane(textPane);
panescrollpane.setVisible(true);
String[] initString =
request+newline
String[] initStyles =
{ "regular"
Style def = StyleContext.getDefaultStyleContext().
getStyle(StyleContext.DEFAULT_STYLE);
Style regular = myClient.textPane.addStyle("regular", def);
StyleConstants.setFontFamily(def, "SansSerif");
StyleConstants.setForeground(regular,Color.orange);
Document doc = textPane.getDocument();
try {
for (int i=0; i < initString.length; i++) {
doc.insertString(doc.getLength(), initString,
textPane.getStyle(initStyles[i]));
} catch (BadLocationException ble) {
// System.err.println("Couldn't insert initial text.");
Hope this helps..
regards,
Kalpana. -
How to change the color of text highlight
I'm trying to select and highlight certain text in the PDF. Here's my sample code. I want to change the color of the highlighted text. Something similar to what the Highlight Text tool does in acrobat.
HiliteEntry hilite;
hilite.offset = 10; //Highlight the tenth word
AVDoc currentAVDoc = AVAppGetActiveDoc();
PDDoc currentPDDoc = AVDocGetPDDoc(currentAVDoc);
AVPageView currentPageView = AVDocGetPageView(currentAVDoc);
ASInt32 pageNum = AVPageViewGetPageNum(currentPageView);
PDColorValueRec red;
red.space = PDDeviceRGB;
red.value[0] = ASInt32ToFixed(1);
red.value[1] = 0;
red.value[2] = 0;
// highlight
AVPageViewSetColor(currentPageView, &red);
PDPage pdPage = PDDocAcquirePage (currentPDDoc, pageNum);
PDTextSelect textSelection = PDTextSelectCreateWordHilite(pdPage,&hilite, 1);
AVDocSetSelection(currentAVDoc, ASAtomFromString("Text"),(void *)textSelection, true);
AVPageViewDrawNow(currentPageView);
AVDocShowSelection (currentAVDoc);
PDPageRelease (pdPage);
If this is not possible, at least can I change the font color or underline the text?
Appreciate any help!Thanks a lot for the help so far. So I was successfully able to crate a highlight annotation from text selection. Here's my code, if anyone else get similar questions.
Only one more question. in my highlight annotation, I get two rounded half circles from the left and right sides. Not sure why?
HiliteEntry hilite;
hilite.offset = 50; // highlight starting 50th word
AVDoc currentAVDoc = AVAppGetActiveDoc();
PDDoc currentPDDoc = AVDocGetPDDoc(currentAVDoc);
AVPageView currentPageView = AVDocGetPageView(currentAVDoc);
ASInt32 pageNum = AVPageViewGetPageNum(currentPageView);
PDEElement pdeElement;
ASFixedRect boundingRect;
PDPage pdPage = PDDocAcquirePage (currentPDDoc, pageNum);
PDAnnot pdAnnot;
PDColorValueRec red;
red.space = PDDeviceRGB;
red.value[0] = ASInt32ToFixed(1);
red.value[1] = 0;
red.value[2] = 0;
// highlight
AVPageViewSetColor(currentPageView, &red);
PDTextSelect textSelection = PDTextSelectCreateWordHilite(pdPage,&hilite, 1);
AVDocSetSelection(currentAVDoc, ASAtomFromString("Text"),(void *)textSelection, true);
AVPageViewDrawNow(currentPageView);
AVDocShowSelection (currentAVDoc);
// make text selection and get the bbox of the selection.
PDTextSelect selectedText = static_cast<PDTextSelect>(AVDocGetSelection(currentAVDoc));
PDTextSelectGetBoundingRect(selectedText,&boundingRect);
// use the bbox to create a highight annotation QuadPoints
CosObj ArrayObj, RecObj;
CosDoc cd = PDDocGetCosDoc(currentPDDoc);
CosObj cosPage = PDPageGetCosObj(pdPage);
ArrayObj = CosNewArray(cd,false,8);
CosArrayPut(ArrayObj,0,CosNewFixed(cd,false, boundingRect.right));
CosArrayPut(ArrayObj,1,CosNewFixed(cd,false, boundingRect.bottom));
CosArrayPut(ArrayObj,2,CosNewFixed(cd,false, boundingRect.left));
CosArrayPut(ArrayObj,3,CosNewFixed(cd,false, boundingRect.bottom));
CosArrayPut(ArrayObj,4,CosNewFixed(cd,false, boundingRect.right));
CosArrayPut(ArrayObj,5,CosNewFixed(cd,false, boundingRect.top));
CosArrayPut(ArrayObj,6,CosNewFixed(cd,false, boundingRect.left));
CosArrayPut(ArrayObj,7,CosNewFixed(cd,false, boundingRect.top));
// for the Rect. Highlight annotations don't require, but API call to create annotation requires this key
RecObj = CosNewArray(cd,false,4);
CosArrayPut(RecObj,0,CosNewFixed(cd,false, boundingRect.left));
CosArrayPut(RecObj,1,CosNewFixed(cd,false, boundingRect.right));
CosArrayPut(RecObj,2,CosNewFixed(cd,false, boundingRect.bottom));
CosArrayPut(RecObj,3,CosNewFixed(cd,false, boundingRect.top));
CosObj cosDict = CosNewDict(cd, true, 4);
CosDictPutKeyString(cosDict, "Subtype", CosNewNameFromString(cd, false, "Highlight"));
CosDictPutKeyString(cosDict, "QuadPoints",ArrayObj);
CosDictPutKeyString(cosDict, "Rect", RecObj);
pdAnnot = PDAnnotFromCosObj(cosDict);
PDPageAddAnnot(pdPage,-2,pdAnnot);
PDPageNotifyContentsDidChange(pdPage);
PDAnnotSetColor(pdAnnot, &red);
AVPageViewDrawNow (currentPageView);
PDPageRelease (pdPage); -
Changing the color of text while mouse listener.
Hi all. working on an assignment for school and I need a little hint.
I am creating an applet to basically input names in txt blocks, and then you hit a button that will move the names to a text area. Well the instructor asked us to use a mouse listener to change the color of the labels on the txt blocks. Basically when you hover your mouse over the button it is supposed to change the color of the button (for and back ground), and change the color of the labels on the txt blocks.
I just did a general setForground(color.blue);
for my labels default color and it seemed to do the trick, I used the following code to try to change the color of both the buttons and the txt block labels, but only the button works.
Please assist..
public class Assignment2 extends java.applet.Applet implements ActionListener, MouseListener {
public void mouseExited(MouseEvent e){
//Colors Back
setForeground(Color.blue);
btnAdd.setForeground(Color.red);
btnAdd.setBackground(Color.yellow);
//Clear Status bar
showStatus("");
public void mouseClicked(MouseEvent e) {
//empty Method
public void mousePressed(MouseEvent e){
//empty method
public void mouseReleased(MouseEvent e){
//empty methodHI,
Sorry for delay. I was not on my seat.
I've modified your code and the label colors are changing now on the mouse over or out events.
I did this only for a single label i.e. "First Name". Just have a look on the code and do the same for the rest labels.
If u feel any problem, then revert to me.
Bye
(Dhananjay Singh)
Here's Your Code
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ColorText extends java.applet.Applet implements ActionListener, MouseListener {
//Declare components
TextField txtName = new TextField(25);
TextField txtLast = new TextField(25);
TextField txtAdd = new TextField(30);
TextField txtCity = new TextField(15);
TextField txtState = new TextField(2);
TextField txtZip = new TextField(10);
Label fName = null;
Label lName = null;
Label address = null;
Label citi = null;
Label state = null;
Label zip = null;
Button btnAdd = new Button("Display Address");
TextArea txaAdd = new TextArea(10, 30);
//Declare variables
String strName;
String strLast;
String strAdd;
String strCity;
String strState;
String strZip;
public void init() {
//Create labels
fName = new Label("First Name");
lName = new Label("Last Name");
address = new Label("Address");
citi = new Label("City");
state = new Label("State");
zip = new Label("Zip");
fName.addMouseListener(new MouseListener() {
public void mouseEntered(MouseEvent e) {
fName.setBackground(Color.RED);
public void mouseClicked(MouseEvent e) {
public void mouseExited(MouseEvent e) {
fName.setBackground(Color.YELLOW);
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
setForeground(Color.blue);
Font g = new Font("Serif", Font.BOLD, 14);
setFont(g);
add(fName);
add(txtName);
add(lName);
add(txtLast);
add(address);
add(txtAdd);
add(citi);
add(txtCity);
add(state);
add(txtState);
add(zip);
add(txtZip);
add(btnAdd);
add(txaAdd);
txtName.requestFocus();
//Colors and Fonts
Font fntName = new Font("Serif", Font.BOLD, 14);
setBackground(Color.lightGray);
txtName.setFont(fntName);
txtName.setForeground(Color.blue);
txtAdd.setFont(fntName);
txtAdd.setForeground(Color.blue);
txtLast.setFont(fntName);
txtLast.setForeground(Color.blue);
txtCity.setFont(fntName);
txtCity.setForeground(Color.blue);
txtState.setFont(fntName);
txtState.setForeground(Color.blue);
txtZip.setFont(fntName);
txtZip.setForeground(Color.blue);
btnAdd.setForeground(Color.RED);
btnAdd.setBackground(Color.yellow);
//listeners
btnAdd.addActionListener(this);
txtName.addActionListener(this);
txtLast.addActionListener(this);
txtAdd.addActionListener(this);
txtCity.addActionListener(this);
txtState.addActionListener(this);
txtZip.addActionListener(this);
btnAdd.addMouseListener(this);
public void actionPerformed(ActionEvent e) {
//Actions
String strOutputLine; //Declare local variable
//Assign text fields
strName = txtName.getText();
strLast = txtLast.getText();
strAdd = txtAdd.getText();
strCity = txtCity.getText();
strState = txtState.getText();
strZip = txtZip.getText();
//Move variables down
strOutputLine = strName + ("\n") + strLast + ("\n") + strAdd + ("\n") + strCity + ("\n") + strState + ("\n") + strZip + ("\n") + ("\n") ;
//Append
txaAdd.append(strOutputLine);
//Clear Text Fields
txtName.setText("");
txtLast.setText("");
txtAdd.setText("");
txtCity.setText("");
txtState.setText("");
txtZip.setText("");
//set focus back to Lastname
txtName.requestFocus();
public void mouseEntered(MouseEvent e) {
// Changing of Button colors
setForeground(Color.red);
btnAdd.setForeground(Color.magenta);
btnAdd.setBackground(Color.green);
//Status bar text
showStatus("Format Address into Text Area");
public void mouseExited(MouseEvent e){
//Colors Back
setForeground(Color.blue);
btnAdd.setForeground(Color.red);
btnAdd.setBackground(Color.yellow);
//Clear Status bar
showStatus("");
public void mouseClicked(MouseEvent e) {
//empty Method
public void mousePressed(MouseEvent e){
//empty method
public void mouseReleased(MouseEvent e){
//empty method
}(Dhananjay Singh) -
Change the color of text in the title bar
Hi,
I have a JFrame. I want to be able to change the color of the text in the title bar. Do any of you know how to do this ?
Please let me know.
Thanks
SangeethaIf you are using Windows, you do it through the Control Panel tool for customizing your desktop display. If you are using some other system, I don't know. You can't do it from your Java program.
Maybe you are looking for
-
How can i use whats app in iphone 3g
how can i use whatspp on i phone 3g?
-
How do I get this stupid U2 album off of my IPhone?
This has got to be the most idiotic marketing stunt ever. Shame on Apple for burning $100MM of shareholder money to do it. I have spent the last half hour trying to get this stupid U2 album off of my IPhone. I tried doing it from my laptop and hid
-
I have an imac on 10.5.8. It has Leopard and it cannot be upgraded any more. I would like to use icloud manually; however, the instructions assume that you have an upgraded machine. When I called Apple they said I could do it. Now I do not know wh
-
if i type simply phrases in to the URL bar (i,e bbc) it use to take me directly to www.bbc.co.uk. but now in firefox 4, it seems to go to google.co.uk instead displaying all the searched items. I then have to click on the link i want. Is there any wa
-
Can I get technical support (repair or replacement) under warranty for my iPhone 5 in Russia? <Personal Information Edited by Host>