UI - Custom Paint in Horizontal Field Manager after completing the setting scrolling
Hello
I am able to do horizontal page scrolling when you add fields in horizontalFieldManger.
But now I want to do a custom in horizontalFieldManager, paint using the page horizontal scrolling top given adjustment.
Thank you
It seems that you want to have background - repeat some almost text in your example. Then move it out of the subpaint and by the paintBackground-, you will not have to invoke any Super... here.
Now when you say that a horizontal scrolling does not work, what exactly do you see? What do you see? Do you have enough focusable fields in your handler for scroll? Have HORIZONTAL_SCROLL style bit set?
Tags: BlackBerry Developers
Similar Questions
-
Assign a spacing equal to the fields in the horizontal field Manager
Hello
I add a number of vertical field managers to a horizontal field Manager. Each manager of vertical field has a text with an image under. The text varies in width images in each vertical field Manager seem to have a different amount of space between them. Is there a way to remedy this situation? Joined a raw image in the way that message on the screen. How can I get the same amount of space between each area of the rectangle?
Thank you
Here's some code that I received from one of the sessions at the last DevCon. Should be useful. Might help explain customer managers too.
/* * EqualSpaceToolbar.java * * Research In Motion Limited proprietary and confidential * Copyright Research In Motion Limited, 2009-2009 */ import net.rim.device.api.ui.*; public class EqualSpaceToolbar extends Manager { private static final int SYSTEM_STYLE_SHIFT = 32; public EqualSpaceToolbar() { this( 0 ); } public EqualSpaceToolbar( long style ) { super( USE_ALL_WIDTH | style ); } protected void sublayout( int width, int height ) { int numFields = getFieldCount(); int maxHeight = 0; // There may be a few remaining pixels after dividing up the space // we must split up the space between the first and last buttons int fieldWidth = width / numFields; int firstFieldExtra = 0; int lastFieldExtra = 0; int unUsedWidth = width - fieldWidth * numFields; if( unUsedWidth > 0 ) { firstFieldExtra = unUsedWidth / 2; lastFieldExtra = unUsedWidth - firstFieldExtra; } int prevRightMargin = 0; // Layout the child fields, and calculate the max height for( int i = 0; i < numFields; i++ ) { int nextLeftMargin = 0; if( i < numFields - 1 ) { Field nextField = getField( i ); nextLeftMargin = nextField.getMarginLeft(); } Field currentField = getField( i ); int leftMargin = i == 0 ? currentField.getMarginLeft() : Math.max( prevRightMargin, currentField.getMarginLeft() ) / 2; int rightMargin = i < numFields - 1 ? Math.max( nextLeftMargin, currentField.getMarginRight() ) / 2 : currentField.getMarginRight(); int currentVerticalMargins = currentField.getMarginTop() + currentField.getMarginBottom(); int currentHorizontalMargins = leftMargin + rightMargin; int widthForButton = fieldWidth; if( i == 0 ) { widthForButton = fieldWidth + firstFieldExtra; } else if( i == numFields -1 ) { widthForButton = fieldWidth + lastFieldExtra; } layoutChild( currentField, widthForButton - currentHorizontalMargins, height - currentVerticalMargins ); maxHeight = Math.max( maxHeight, currentField.getHeight() + currentVerticalMargins ); prevRightMargin = rightMargin; nextLeftMargin = 0; } // Now position the fields, respecting the Vertical style bits int usedWidth = 0; int y; prevRightMargin = 0; for( int i = 0; i < numFields; i++ ) { Field currentField = getField( i ); int marginTop = currentField.getMarginTop(); int marginBottom = currentField.getMarginBottom(); int marginLeft = Math.max( currentField.getMarginLeft(), prevRightMargin ); int marginRight = currentField.getMarginRight(); switch( (int)( ( currentField.getStyle() & FIELD_VALIGN_MASK ) >> SYSTEM_STYLE_SHIFT ) ) { case (int)( FIELD_BOTTOM >> SYSTEM_STYLE_SHIFT ): y = maxHeight - currentField.getHeight() - currentField.getMarginBottom(); break; case (int)( FIELD_VCENTER >> SYSTEM_STYLE_SHIFT ): y = marginTop + ( maxHeight - marginTop - currentField.getHeight() - marginBottom ) >> 1; break; default: y = marginTop; } setPositionChild( currentField, usedWidth + marginLeft, y ); usedWidth += currentField.getWidth() + marginLeft; prevRightMargin = marginRight; } setExtent( width, maxHeight ); } }
-
How to change the background color of the horizontal field Manager
How can we tell the background color of the horizontal field Manager (hfm) hanger
If we should extend and override in ppaint, I tried
I got color of hfm in tag I added to this
all give me idea
Try this:
HorizontalFieldManager manager = new HorizontalFieldManager() { public void paint(Graphics graphics) { graphics.setBackgroundColor(0x000000FF);//blue graphics.clear(); super.paint(graphics); } };
Concerning
Bika
-
The following code snippet contains a horizontal field Manager to which are added five buttons.
1. I can't the value of horizontal scrolling to horizontal management Manager because of who I am not able to access the keys 4 and 5.
2. usually, we put horizontal scrolling in the following way:
container = new HorizontalFieldManager(USE_ALL_WIDTH|HORIZONTAL_SCROLL|HORIZONTAL_SCROLLBAR);
3. so I also tried setting of horizontal scrolling in the following way
container = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL|Manager.HORIZONTAL_SCROLLBAR) { protected void sublayout(int maxWidth, int maxHeight) { Field field = null; int x = 0; int y = 0; int maxFieldHeight = 0; int maxFieldWidth = 0; for (int i = 0; i < getFieldCount(); i++) { field = getField(i); layoutChild(field, maxWidth, maxHeight); setPositionChild(field, x/*width-field.getWidth()*/,y); x+=field.getWidth(); maxFieldWidth = maxFieldWidth + field.getWidth(); System.out.println("field width"+field.getWidth()); System.out.println(" max field width"+maxFieldWidth); if(i==0) { maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height } } System.out.println("final max field width"+maxFieldWidth); setExtent(maxFieldWidth, maxFieldHeight); } };
but it's not working.
4 I found this property: (position) horizontalFieldManager.setHorizontalScroll; that contains the parameterioo where the post is supposed to be the new horizontal scroll position. I tried passing the coordinate x of horizontal field Manager, but it does not work. I should pass as a parameter position?
HorizontalFieldManager container = new HorizontalFieldManager() { protected void sublayout(int maxWidth, int maxHeight) { Field field = null; int x = 0; int y = 0; int maxFieldHeight = 0; for (int i = 0; i < getFieldCount(); i++) { field = getField(i); layoutChild(field, maxWidth, maxHeight); setPositionChild(field, x,y); x+=field.getWidth(); if(i==0) { maxFieldHeight = field.getHeight(); // height set of the first button since all components have the same height } } setExtent(Display.getWidth(), maxFieldHeight); } }; ButtonField button1 = new ButtonField("Button1"); ButtonField button2 = new ButtonField("Button2"); ButtonField button3 = new ButtonField("Button3"); ButtonField button4 = new ButtonField("Button4"); ButtonField button5 = new ButtonField("Button5"); container.add(button1); container.add(button2); container.add(button3); container.add(button4); container.add(button5); add(container);
Need your valuable comments and suggestions. Please help me.
I think that there is a bug in the sublayout (your HorizontalFieldManager 0 mode. Given that the code did what I think WHAT HFM will do anyway, I recommend that you try to do this with a standard HFM, using this style:
Manager.HORIZONTAL_SCROLL | Manager.HORIZONTAL_SCROLLBAR
Let us know how you go.
When I have more time I'll explain the bug, but if you want to investigate something, be aware that the maximum size that you can use in setExtent are the values that are passed to sublayout. Compare the width as you try to define in setExtent whose width is increased.
-
Ligtroom 6 Better, I will describe my problem once right 1. always after 4 weeks, I get the message "trial version expired Ligtroom 6a 2. you will be asked to fill out my license number 3. After completing the restart and get the message "error 16". 4. all again manager install Adobe again and install this once again repeated problem Ligtroom each month can ensure that this stops my version is a purchased official version Now repeat the problem after only 4-5 days! Caveat! I'm not a computer specialist are not too complicated solution Since this is an open forum, not Adobe support... you must contact Adobe personnel to help
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
Don't forget to stay signed with your Adobe ID before accessing the link below
Creative cloud support (all creative cloud customer service problems)
-
Driver management has completed the process to add the HdAudAddService Service
At windows 8, just upgraded to 8.1 windows and sound does not just work. I refreshed the pc, the sound seems to come back but then then after 10 hours, the problem came back use a toshiba satellite pro just 1 year and it is in perfect condition until I upgraded to 8.1 windows and this is the message that appears on the sound propertiesDriver management has completed the process to create the Service HdAudAddService of ID device Instance HDAUDIO\FUNC_01 & VEN_1002 & DEV_AA01 & SUBSYS_00AA0100 & REV_1002\4 & 9339 A 11 & 0 & 0001 with the following status: 0.
Driver management concluded the process to install the driver hdaudss.inf_amd64_70c6945afa5f06b5\hdaudss.inf for the Instance ID of device HDAUDIO\FUNC_01 & VEN_1002 & DEV_AA01 & SUBSYS_00AA0100 & REV_1002\4 & 9339 A 11 & 0 & 0001 with the following status: 0x0.Method 1 worked 100% here!
http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-hardware/driver-management-has-concluded-the-process-to-add/04857a5a-5c8e-4790-9D24-5f4c40591a0e
YES!
No need to uninstall my drivers!
I worked in the Services and tinkered with him and he started etc but change for local totally worked!
YES!
Thank you!
-
Cancellation of WIP job after completing the work
Hello everyone,
There is a question of "Annulant the WIP job after completing the work.
Please let me know how to solve this or workarounds.
Give me the navigation please.
Thank youHi Adam;
Please search your question in metalink as cancelling WIP Job there are 272 available docs. Please check. The best way to check your question in these docs
Respect of
HELIOS -
How to add the line of separation in the horizontal field Manager
I want to get as
name | Age | year
all this in a horizontalfield Manager, how to do.
I used the field separator, comes to the entire screen, such as
name | Age | year
| |
| |
| |
How do I solve this problem
Thank you
You can also do this by substituting your HorizontalFieldManager sublayout() method.
As:
h = new HorizontalFieldManager() { protected void sublayout( int maxWidth, int maxHeight ) { int width = Display.getWidth(); int height = 30; //height of the manager super.sublayout( width, height); setExtent( width, height); } };
Concerning
Bika
-
E10 - custom not filling form fields do not in the merge field
I'm new to Eloqua. I created a contact form and custom fields. The contact fields merge without any problem in an e-mail, but the custom fields are not filling. Can anyone tell me why and how to get these custom fields to fill in the e-mail address?
You can create fusions of field fields existing on another object. If you want to create a fusion of field, you must either would also create these fields on the contact record or a custom object. On your form, include a processing step that updates the registration of contact or the LCO (depending on which route you choose).
-
After completing the upgrade Windows 7 laptop does not start
A ran the Windows 7 upgrade on a new laptop Sony Vaio with Windows Vista. After installation is complete laptop ran fine for 2 days.
Necessary to restart after trying to connect a new printer. Stop the laptop normally, but after a reboot would only boot to Windows Boot Manager.
The problem is that the upgrade of Windows CD I have is not start even if the DVD has been the first priority in the boot sequence.
If you are somehow able to boot from the installation DVD:
1. Insert the DVD of Windows 7 and restart your computer
2 boot from the DVD.
3. choose your language and click Next.
4. click on command prompt and try the following commands (they may or may not work):Bootrec /fixMBR
Bootrec /fixBoot
Bootrec /rebuildBCD
Bootrec /scanOSQuestions about installing Windows 7? Read this:
FAQ - Frequently Asked Questions from Installation Windows 7 & responses -
Error-1074360293 (IMAQdx Timeout) after completing the acquisition for some time
My vision in LabVIEW application makes several acquisitions and successful treatment but then acquiring (grab) suddenly fails with a timeout error (-1074360293, IMAQdx: timeout). The error does not when acquiring only the images.
After that the error occurred that no acquisition is possible. Although LabVIEW is closed MAX Returns a time-out error. Only restart helps.
some details of the material:
3 controllers FireWire (1394-a)
3 cameras connected to the first two controllers, one third (total of 7 cameras)
Mode for all cameras: 1280 x 960 Mono 8 fps 7.50
The bandwidth for a FireWire controller is sufficient. (Three cameras on a single controller are running without any problem).
Consume the application memory is short before or after that the error occurs. But I can't find where exactly.
Until the error occurs a few minutes until one and a half hour pass.
More details will follow.
Is there a FireWire or specialist in the vision that can help you?
Greetings,
SHB
Change the driver it seems to fix the problem:
"Compatible (legacy) 1394 OHCI host controller" (in German: "OHCI - 1394-Hostcontroller (alt) konformer")
With this pilot test has worked for more than 66 hours without raising an error.
Some Articles about:
http://www.RME-audio.de/forum/viewtopic.php?id=9827
http://www.myvideoproblems.com/ProblemPages/CannotCapture.htm
-
Does not start the web page after completing the configuration
I have a problem with vCD 5.5.2 running on my lab at home. I made sure that all the prerequisites are met. The cell has been initialized properly without one mistake and I'm still not able to launch web page, no idea why this happens?
vCD is installed on CentOS 6.x
I enclose cell.log
I hope someone can share his thoughts with me.
Thus, all the cell.log told me is that the service obtained running.
vCloud-container - debug.log will tell me if there is an error after starting the services.
If this is a new installation of the OS, the firewall blocks outgoing default HTTPS traffic. can you try to disable just the firewall for a short time, restart vmware-vcd service, wait for the cell.log to show finished, and then try again? The firewall is the most common question on the newly installed outside the research forward/reverse DNS is not configured for both HTTPS and ConsoleProxy Treaty.
-
effect of animation for horizontal field Manager
Hello
I have three willing fieldManagers horizontally in the content ofaverage fieldmanager will change on click of a button
is it possible to apply slide in French - sliding effect to these content?
I don't want to do the new screen n again?
Wrap the Middle Manager in a HorizontalFieldManager (HORIZONTAL_SCROLL). When you want to remove the old content and slide into the new, follow these steps:
(1) adds the new content the HFM;
(2) an animation slide to the left edge of the old content (probably 0) up to the left edge of the new (getLeft() returns). Use the method suggested by Peter;
(3) once the animation finished, remove old content and setHorizontalScroll on the HFM wrapping to 0 (since the new content now starts it).
-
some fields shows don't not in horizontal field Manager
Hello
I try to have several lines with label, number and units. For example temperature, 17, F. When the application draws lines the label is visible, but the units are not. No idea why? Maybe it's pushing too far to the right, and they are off the screen? I use the Simulator for this.
I tried to limit the size of the label field with no luck and I have also experimented with eliminating the label field, which causes the units to appear but then of course I still need labels. My code is below:
Private HorizontalFieldManager generateMeasurementField (label As String, String unitLabel) {}
Line HorizontalFieldManager = new HorizontalFieldManager();
Field TextField = new TextField();
field.setEditable (false);
field.setLabel (label);
UnitField TextField = new TextField();
unitField.setText (unitLabel);
unitField.setEditable (false);
Row.Add (Field);
Row.Add (unitField);
next row;
}And then I subsequently add each row to the Senior Manager.
TextField is eager for width: it occupies the entire available width (do not leave anything for the rest of the fields). If you do not need to edit the text, use LabelField instead: they are economical and meet only as needed.
-
align the horizontal field Manager
Hello
I need where I want my horizontalfieldmanager just above the horizontalfieldmanager another which is initilized as setStatus... (below the screen)...
use an optimization of resources, place the two hfms, use setStatus with optimization of resources.
Maybe you are looking for
-
Satellite P200 - 10 c: camera does not work after upgrade to Vista ultimate
After the full vista upgrade webcam did not work. After some research, I found that I had to change the driver for usb video camera I did. Everything works fine now except the snap button of the camera software. Record audio and video works fine. Sna
-
How to get movies to play in 3D on the Qosmio F750-03W
Hello I have a little problem in getting to play 3-d movies.Even after I read the manual im not entirely sure how to operate. any tips? What I have to buy 3D movies to make it work?
-
Hello. I have a program that is running multiple threads. When the user clicks the start test button, a new thread is created to run all data acquisition and task processing. Part of the task of data acquisition is to acquire an analogue to the di
-
DOWNLOAD AUTO DOWNLOADED KB2833941 IT FAILS TO INSTALL
Download Aotomatic loaded a download and it will not install. I tried several times with no results. I can't remove it. Try to download whenever I turned off my computer. I'm sure that I downloaded need but it will not. All of the suggestions. Thank
-
Medion computer on update error! Oxc0190036! 1833/94660
My Medion computer is frozen why? It is a meassage! Oxc 190036! 1833/94660 (virtual Diskservice DL.man. I try to put the disck recovery but it still does not. What to do next please help E-mail address is removed from the privacy *.