gray line after each line of list field
Hi friends,
I would like to draw a gray line after each line of listField I use folowing d
graphics.setColor (Color.LIGHTGREY);
graphics.drawLine (0, y, Graphics.getScreenWidth (), y);
then the line is gray (the color of the text)
then as the then-jeutiliser
graphics.setColor (Color.LIGHTGREY);
graphics.drawLine (0, y, Graphics.getScreenWidth (), y);
graphics.setColor (Color.BLACK);
It works, but, more early when the update comes to rowing of the color of the text will change to white but now always the text is black
So, how can I draw a gray line after each listfield rw without affecting the texts
You must save the original color and reset it after drawing like that.
int origcolor = graphics.getColor(); graphics.setColor(Color.LIGHTGREY); graphics.drawLine(0,y,Graphics.getScreenWidth(),y); graphics.setColor(origcolor);
Tags: BlackBerry Developers
Similar Questions
-
Line does not come after each row of the list
Hello
I show a list in my current application. In the list, I paint a line after each line. Just a line of string, I add in each line. Now when I'm checking the list, on some devices, lines are coming. As in Bold 9790, after each line, a line is added. But in the Torch 9810 and curved 9320, line is not there. I don't get why this different behavior for different devices.
Can someone please help.
Here is my code:
public class ListCallBack implements ListFieldCallback{ public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) { String text = "xxxxxxx"; graphics.setFont(FONT_FAMILY_1_SF_AS_08); graphics.drawText(text, 10, y, DrawStyle.ELLIPSIS, width); if (index != 0) { graphics.setColor(Color.BLACK); graphics.drawLine(0, y-12, width, y-12); } } public Object get(ListField listField, int index) { // TODO Auto-generated method stub return mAccounts[index]; } public int getPreferredWidth(ListField listField) { // TODO Auto-generated method stub return screenWidth; } public int getPreferredHeight() { return getContentHeight(); } public int indexOfList(ListField listField, String prefix, int start) { // TODO Auto-generated method stub return listField.getSelectedIndex(); } } }
Thank you...
The best result I wanted to say, variable height from station to station. So currently I use the line height and made changes accordingly.
Here is my Code:
Font f = FONT_FAMILY_1_SF_AS_08; graphics.setFont(f); int h = f.getHeight(); int height = (listField.getRowHeight() - h)/2 ; y += height; graphics.drawText(text, 10, y, DrawStyle.ELLIPSIS, width); if (index != 0) { graphics.setColor(Color.BLACK); graphics.drawLine(0, y - height + 1 , width, y - height + 1); }
It worked properly. Thanks a lot Peter and Simon.
-
Insert a blank line after each line grouped
Oracle 11.2.0.1
Windows XP
I need to create a table (who have more to exported to the Excel SQL Developer) something like this:
The user Scott Table Emp
create the table temptbl as
SELECT
-case when lead (deptno) OVER (ORDER BY deptno) = deptno then empno otherwise null end AS empno.
-case when lead (deptno) OVER (ORDER BY deptno) = deptno then ename otherwise null end AS ename.
-case when lead (deptno) OVER (ORDER BY deptno) = deptno then job otherwise null end AS work,
-case when lead (deptno) OVER (ORDER BY deptno) = deptno then null deptno otherwise end up LIKE deptno
WCP
Table created.
SQL > select * from temptbl;
EMPNO, ENAME, DEPTNO JOB
---------- ---------- --------- ----------
7782 CLARK MANAGER 10
PRESIDENT OF 7839 10 KING
7566 JONES MANAGER 20
FORD ANALYST 20 7902
7876 ADAMS CLERK 20
SMITH CLERK 20 7369
7521 WARD SALESMAN 30
7844 TURNER SELLER 30
7499 ALLEN SALESMAN 30
EMPNO, ENAME, DEPTNO JOB
---------- ---------- --------- ----------
7900 JAMES CLERK 30
MANAGER OF 7698 30 BLAKE
14 selected lines.
SQL >
But it is not giving me the last row of deptno. If I have to display the data on sqlplus then I can use break on jump 1, but since I create my correct query table (around 10 K lines), I just want to insert a blank line after each data grouped.
Thank you.
Select empno, ename, job, decode (empno, null, null, deptno) deptno emp
Group by grouping sets ((empno, ename, job, deptno), deptno)
/
EMPNO, ENAME, DEPTNO JOB
----- ---------- --------- ----------
7782 CLARK MANAGER 10
PRESIDENT OF 7839 10 KING
7934 MILLER COMMITTED 10SMITH CLERK 20 7369
7566 JONES MANAGER 20
7782 CLARK MANAGER 20
SCOTT ANALYST 20 7788
7876 ADAMS CLERK 20
FORD ANALYST 20 79027900 JAMES CLERK 30
7499 ALLEN SALESMAN 30
7521 WARD SALESMAN 30
7654 MARTIN SALESMAN 30
SALESMAN 7698 BLAKE 30
7782 CLARK MANAGER 30
7844 TURNER SELLER 30 -
Change the value of the balance after each line
Hi all
I do a sql statement returning the vacation schedule for this year for all employees.
The query displays the name, from date to date, the balannce of vacation of the employee, the number of vacation days and the balance after the holidays
: -------------------------------------------------------------------------------------------------------------------------------------------------------
Name - Of - from Date to Date - holiday balance - vacation days - after sale: -.
Alan--------------------------June 2010--------------- 15-July 2010 ------------68 ------------------------33 ---------------------35 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Tom-------------------------June 2010--------------- 12-August 2010 ------------ 177 ------------------47 ----------------------130 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Adam------------------------July 2010--------------- 12-August 2010 ------------ 73------------------------- 26 ---------------------47 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Adel-------------------------August 2010--------------- 05-August 2010 ------------158 ---------------------5 --------------------153 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Alan ------------------------August 2010--------------- 16-September 2010 ------------ 68------------------ 19 ---------------------49 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Tom ------------------------September 2010--------------- 09-September 2010 ------------177 -----------5 ---------------------172 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Suzy-------------------------September 2010 ---------------30-September 2010 ------------127------------- 19---------------- 108 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Adel-------------------------September 2010 ---------------16-September 2010 ------------158------------ 5 -------------------153 : -------------------------------------------------------------------------------------------------------------------------------------------------------
Adam -----------------------November 2010--------------- 09-December 2010 ------------73--------------- 19--------------------- 54 :--------------------------------------------------------------------------------------------------------------------------------------------------------
Tom ------------------------December 2010 ---------------05-January 2011 ------------ 177 -----------------17 ----------------160 :--------------------------------------------------------------------------------------------------------------------------------------------------------
My problem is that the balance of vacation is not correct after each retrieved line. It should be updated after the extraction of all ranks. My query is:
{code
Select Emp_ar_name_full Date_from Date_to, Vacation_balance, number_of_days, BALANCE_AFTER vacation_balance-number_of_days
of HRS_V_EMP_VACATIONS_schedule@pms VAC,HRS_V_EMP_BASIC_INFO@pms emp
WHERE EMP. EMP_ID = VAC. EMP_ID
AND dept_id = 7
And sect_id = 11
and To_Number (To_Char (sysdate, 'yyyy')) = 2010
and EMP_ACTIVE = 'Y '.
AND DATE_FROM > = SYSDATE
order of Date_from
}
I want to change the query so that the vacation balance will be updated after the extraction of all the ranks of an employee
Thanks in advance
Published by: [email protected] on June 7, 2010 14:33Can change this:
vacation_balance-number_of_days BALANCE_AFTER
TO:
vacation_balance - sum (number_of_days) over (partition by order of emp_ar_name_full of date_from) BALANCE_AFTER
For an example, please post a small test case.
Kind regards
Rob. -
queue a file by adding spaces after each line
Hello
I am the result of a sql queue in a csv file in the linux operating system. But the file generates a lot of blank lines after each line. How can this be eliminated in queue
Thanks in advance
SASBy default, SQL * more spool empty right pads each LINESIZE value line. Add
SET TRIMSPOOL ON
to your script.
SY.
-
Introduce the empty line after each subtotal
I want to add a blank line after each subtotal for readability. I thought that Char (13) would do the trick. You have any ideas on how to achieve this?
Thank you
Dinesh.In the PivotTable, you can do it in double layer on the column that you are dissociation on. Then in the ownership of the sum of the column in double, specify label only. Hide duplicated columns.
HTH
-Prakash -
Firefox cleans the exceptions list 'Allowed Sites - Installation of modules' after each reboot. I tried the new own profile - everything works fine. I don't want to installation and implementing all addons after reset of profile, so try to understand the problem.
Compensation for the "Site Preferences" (in the "Clear recent history" or Ctrl + Shift + Delete) same for the "last time" helped.
(permissions.sqlite contained an empty table instead of default lines)
-
Gray lines clear that appears when loading Web pages.
In the little time when I click on a link and Firefox loads the page, there are these small gray lines that appear. (http://prntscr.com/56zhsd) When I bought my computer, there are not. But less than a week, they began to appear and they kept adding just now since.
I've updated to the latest version of Firefox and I ran it in Safe Mode, no solution.You can try to disable hardware acceleration in Firefox.
- Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.
You will need to close and restart Firefox after enabling/disabling this setting.
-
HP psc 2110xi to print vertical gray lines on all printing (Windows 8.1)
My hp 2001xi all-in-one psc began to print vertical gray lines on all the text and images on the test document in the problem-solving programs. I asked troubleshooting this site to uninstall/reinstall it from this site which it has fact/could not, sayiny do my control panel, which is now no longer present the program of hp, or my research could find it. I am running Windows 8.1 on my ASUS laptop.
HP Print and Scan Doctor can't find anything wrong.
I can still print documents with gray lines, obscuring everything.
April1440
Thank you for the information about the printer to uninstall for Windows 8.
The problem of the gray line seems to be now disappeared after a very simple remedy...
1. disconnect the USB and power cord
2. plug in USB and power cord
Tah dah! Printer's original, more grey lines!
I got this tip on the site, although the "vertical" illustrate and described were quite different than what mine were.
Now, if I will be memorized for future reference, as I remember that this remedy has worked for other issues in the past.
Thanks for the support. April
-
gray lines and sections on the imported images
Photo transfer problem
During Transfer of photos (jpeg) of nikon D3000 to 531 with Vista Dell inmages are fine on the camera photo, but once imported, Vista adds gray lines and sections to more than 60% of the images
Just some thoughts...
(1) the corruption can develop when downloading
photos via the USB port after a long when photo shoot
for Camera batteries are low.(2) you have a bad USB cable or port.
(3) If you have an internal drive or external...
try to insert the memory card and download it from
There just to see if the pictures are always corrupt. -
HP Pavilion m6 random Gray lines at startup
My HP Pavilion notebook m6 just randomly started appearing grey lines on different sections of the screen during startup. Usually, it also causes the laptop to close. I tried to tilt the screen back to see if it was a connection to the screen, but it changed nothing. Plug the charger is the entire screen have gray lines when starting. I mean by gray lines, it is almost as if you unplug the cable from the TV. Some lines are just randomly and staticy yellow and black type. When the laptop starts up and gets past the login screen is not do.
Any help as to why he does this?
Well, I sat for an hour after struggling to understand the problem...
Sometimes if you held the power button down it would be arrives at start of Windows then going crazy, went from a gray staticy flicker to blue to red, etc., then turns off. I took out battery, hold the power button for 1 minute to get rid of all the energy stored, deleted RAM memory and reinstalled everything.
Oddly enough, the computer starts fine in mode safe mode, but not in the regular windows all the time.
Has finally got to start Windows, travelled the HP support site and did an audit and found updates the BIOS was one of them. Updated it restarts fine now. Will post if anything that acts to the top once again!
-
JavaScript to extract the second line only a field of text as a PDF? Is this possible?
I have a PDF form created in Acrobat DC. One of the fields is a for the name and address multi line text field. The user between that info with carriage returns in a field named the plaintiff that ends in a format such as:
Name
Mailing address
City, State Zip
I need to extract JUST the second line of this field to complete another field of text with these data. So, my second text field called StreetAddress and would automatically extract only the second input line in the text field named candidate.
Is it still possible? If so, can someone give me an example of how this can be accomplished? I don't want to ask the applicant to each line of input in separate fields.
Of course, it is possible. Use this code as the "StreetAddress": custom calculation script
var fullAddress = this.getField("Applicant").valueAsString; var lines = fullAddress.split("\r"); if (lines.length>1) event.value = lines[1]; else event.value = "";
-
Gray lines at random in the text placed
Hello
I'm working on placing a word of a manuscript document in InDesign CC. I spent hours and hours to get the text document formatted just right so that I could just place without having to do much else. To my dismay, some of the poems that I place make their appearance with random gray lines interspersed in the text box. More troubling still, when I export to PDF, the lines are flat black. How can I get rid of these? If there is a way to do this effectively without having to modify the original text document in InDesign, it would be ideal. Fixing of the screenshots below. Thanks in advance for any help!
Those look like paragraph nets (rule below, in this case), and you have obviously some empty paragraphs used to add space instead of use the space before or after the space to spread the paragraphs apart.
-
Hello
I'm working on a catalog for my work.
I've been placing various texts and images in my document and all is going well so far.
Each image is put in the same way and showed no abnormalities whatsoever.
I have now two images that normal in my Indesign document, but display gray lines up and down when I export as a PDF document.
These are the only images that are not show the right path.
Looked on google for an answer without success.
Help, please!
Kind regards
Ralph
PS. the images themselves do not contain the grey lines.
In fact, it fixed itself.
I think my CPU is slow to generate lines in Indesign, because I can see them now.
So I made the image just large enough for the lines out of the viewbox, but keep the image.
Thanks for your response!
-
External text of county line dynamic text field
Hello friends,
I've done a scroll bar, , but now I have a problem, need to read the number of lines dynamic text field and If it is greater than x show the scrollbar and hide if is less.
Like this:
if(Text.instance>7) {}
ScrollBar._visible = true;
}
else {}
ScrollBar._visible = false;
}
My problem is How do I count the total of lines of dynamic text field after load an external text.
then either:
1. what you see is not aplicationScroll or
2. you have more than 1 scrollbar named aplicationScroll or
3. you have the code runs also change the aplicationScroll to true _visible property.
Use the movie Explorer to track down your error.
Maybe you are looking for
-
Good evening Recently, I am facing a lot of quick firefox crash and I went through all the troubleshooting steps step, until I arrived (disabling addon-by-time, plugin by time). The problem had been solved almost when I took (ask to activate, NOT alw
-
Bookmark scrambled hierarchies
Somehow, I buried the folder "All bookmarks" under another folder called the same thing. However when I go to record new URL, Firefox will only recognize the buried file. The buried file has three official Firefox, my menu bookmarks toolbar menu, but
-
I tried some of the ideas in the forums and Vista still won't let me load the drivers. It recognizes the printer and I'll install the drivers, no luck getting error 0x000003eb. At IT, share the printer UAC is on, tried with offshore, does the same th
-
Could not complete the backup - error 0 x 80080005
When I try to set up the backup I get "the application of backup could not start due to an internal error: Server execution failed (0 x 80080005).» original title: 0 x 80080005
-
Windows Live Mail sent emails do not appear in the 'Sent items' folder
original title: sent Mail not in the folder I've just set up Windows Live Mail on a new laptop using Windows 7 Outlook came not with my desktop software. Why don't emails I send appear in my folder "sent items"?