ImageButtonField and Hover/onFocus

I use the following class to create an image button...

public

class ImageButtonField extends BitmapField

{

public ImageButtonField (Bitmap image) {}

Super (image);

}

public Boolean isFocusable() {}

return true;

}

protected Boolean navigationClick (int status, int time) {}

fieldChangeNotify (0);

return true;

}

protected Boolean trackwheelClick (int status, int time) {}

fieldChangeNotify (0);

return true;

}

protected Boolean {keyChar (characterchar , int status, int time)

if (Characters.ENTER == character |) Characters.SPACE == character) {}

fieldChangeNotify (0);

return true;

}

return Super.keyChar (character, status, time);

}

}

I would like to offer a "hover" button to use when the imagebutton control is obviously/onficus.  I tried overrriding onFocus and using setBitmap (Bitmap.getBitmapResource ("whatever.png")), but it does not work.  Also what ends up happening, is that the fieldchangelistener triggers whn I try to substitute onfocus.  Any ideas how I can modify this class to provide a bitmap of hover?

)

Hello

Check this class,

SerializableAttribute public class ClickbleImage extends {field}
private String str;
private Bitmap bitmap1, bitmap2;
Private boolean isFocus;
public ClickbleImage (Bitmap bitmap1, Bitmap bitmap2, long style, String str) {}
Super (style);
This.bitmap1 = bitmap1;
This.bitmap2 = bitmap2;
This.Str = str;
}
protected boolean navigationClick (int status, int time) {}
Returns true;
}
protected void onFocus (int direction) {}
super.onFocus (branch);
isFocus = true;
label.setText (str);
Invalidate();
}
{} public void paint (Graphics g)
{if (isFocus)}
g.drawBitmap (0,0,bitmap2.getWidth (), bitmap2.getHeight (), bitmap2, 0, 0);
} else {}
g.drawBitmap (0,0,bitmap1.getWidth (), bitmap1.getHeight (), bitmap1, 0, 0);
}
           
}
Protected Sub layout (int w, int h) {}
setExtent (bitmap1.getWidth (), bitmap1.getHeight ());
}
protected void onUnfocus() {}
isFocus = false;
super.onUnfocus ();
Invalidate();
}
protected void drawFocus (Graphics graphics, boolean on) {}
}
}

here to go the two images, one for development and another for unfocus and if you want you can pass a string to be displayed to the bottom of the horizontalfield containg the bitmap, the bitmap on focus than string appears.

create an instance of this class and add those of hfm or vfm and consume a click is like that

protected boolean navigationClick (int status, int time) {if (UiApplication.getUiApplication () .getActiveScreen () .getLeafFieldWithFocus () instanceof ClickbleImage)
latest development of ClickbleImage = (ClickbleImage) UiApplication.getUiApplication () .getActiveScreen () .getLeafFieldWithFocus ();
If ((attention! = null) & (focus instanceof ClickbleImage)) {}

code here

}

}

or use fieldChangeListener as simon says.

Thank you & best regards

pp

Tags: BlackBerry Developers

Similar Questions

  • Bootstrap and hover content

    Hi all

    I used a jQuery ContentHover Plugin from this page jQuery ContentHover Plugin - backslash for 3 of my images and it works very well. I like it's whiny image, additional info is displayed. For the office, it works fine but when reducing the browser it does not correctly. While my image is reduced because it is sensitive, the contentHover size remains the same as it is for the office. FYI, I don't foresee this effect in my mobile display. So I have 2 questions.

    1. Is it possible to have the sensitive contentHover like my images?
    2. is there something similar in the Bootstrap that I can use to create this effect?

    Thanks for your help.

    Ian. G.

    I have re - purpose component Bootstrap ToolTips.  See below for more details.

    Figure captions with Bootstrap ToolTips - http://alt-web.com/

  • Need to help the transportable tablespace, after conversion and hover over datafile

    I need the transportable tablespace, help you convert and move the data file on the target server, how I their connection to the ASM instance?

    And how to start the database? should what controlfile I use?

    Thank you.

    I hope this helps.

    http://taliphakanozturken.WordPress.com/2012/03/27/moving-datafiles-and-redo-log-files-from-filesystem-to-ASM-storage/

    http://taliphakanozturken.WordPress.com/2012/03/21/how-to-move-a-datafile-from-file-system-to-ASM-disk-group/

    Talip Hakan Öztürk
    http://taliphakanozturken.WordPress.com/

  • With the help of active and hover link color, visited

    Sorry, I found the answer...

    Sorry, I found the answer...

  • Custom problem with CFINPUT, masks and onFocus events

    I'm running into an interesting problem, I found a bug in ColdFusion MX 7.0.2 on Windows Server 2003. I have a CFINPUT field with a mask and an onFocus event. When the page is rendered, however, the resulting HTML code has two events onFocus with my called twice and the mask function, called only once. I was able to work around this problem, but it is kind of annoying. See the example below:

    It's not a bug it's a feature, depending on your point of view. Focuses on the first field with a mask using the mask attribute. Your code runs subsequently.

  • "your advice regarding the account settings is: go to the Tools menu, and then click account settings ' but when I click on tools I can't see account settings

    All I'm doing is to see my host SMPT name

    Most documentation refers to the now hidden Menu bar. Like most of the software by pressing alt or F10 applications reveals hidden menus bars.
    I suggest that you put the Menu bar so it displays all the time.
    The Menu bar, select View-Toolbars and click on the menu bar.

    When you get to the setting of the account go to the bottom of the list of accounts on the left side, then click outgoing server (SMTP) to view and change this info.

    You can also get to the account setting by clicking with the right button on the account in the left pane and the selection parameters.
    If you use the messed up AppMenu button, click on that and hover over the Options. The choice of the account setting is displayed.

  • YouTube and 8.1 of Windows touch problem

    I am running windows 8.1 on my surface 2 pro, and I'm having some problems with the help of the touch interface with youtube. When a youtube page is opened and I click on the flash element to start the video, or if I touch any of the buttons in the flash element, the video freezes, and firefox will be unresponsive until I have plug in a mouse and hover the cursor over the window.

    This problem has only started happening since I've updated the flash player plugin the other day and before this update youtube seems to have a more friendly, stocky touch interface, which also worked more systematically with contact entries.

    Now this is very probably a flash problem, and he has this kind of questions with a few other flash elements, but since I only seem to get with firefox, I thought I would ask here for advice.

    Thanks for any help!

    And it seems that updating windows over some pilots set coincidentally all my questions. Please skip this question.

  • How hovering over the menu as history, bookmarks, and options buttons, open their menu expanded without hovering over the arrow beside them?

    I am at the end of "the most recent difficulty updated" and the last thing I want to do before I head for the door, it is make sure when I open the menu and hover on things like the Favorites of history and options, that their submenus open when my mouse is positioned on the words or arrows. at the present time the sub menus open only when I hover over the arrow.
    I want to do the words and their arrows, a single button with the functional purpose of the two.
    Thank you in advanced for your time.

    Do you use the extension classic restaurateur theme?

    It's one of the things that I also noticed when you use this extension.

    Maybe contact the developer to see if this behavior can be changed.

  • PhtoPrint Dell 926 AIO and Windows 10

    Hello-

    I am posting this for a neighbor who called for assistance with this printer very old.  It uses your desktop Acer Veriton wireless connection at his home router.

    It was on Windows 7 Home and the printer worked very well.  He bit on the free Windows 10 Home can offer upgrade of Microsoft and went through.  It's about 1 month and a half ago.  The AIO 926 actually worked very well under Windows 10 Home 64 bit without user intervention, according to him.  Then one day last week, the printer stopped working and that's where I got.

    I know there are a lot of articles and posts here with RockStar Rick K is heavily involved.  I read the most before going to his house.  So, I took a quick glance to the queue to print the Windows user interface.  He had two jobs in the queue with the top of the front page showing 'Error' and the second showing "sent to the printer.  I have cleared both by using the Windows user interface. I then unplugged the printer to the USB port and also off it.  I unplug the power cable from the wall.  Let stand 5 minutes then pressed and held in the power button to erase the bad karma.

    I then ran the printer queue script permission.  No errors.  I tried to run printer removal utility.  Let him ride for a good 45 minutes with the sign "Please wait...". ».  After that long task was always to 'Running' poster, but I didn't trust that.  I killed him to this place.  Now, here's what I don't know.

    Use the set of drivers Vista 32 bit?  I tried and extraction & implemented crossed.  I see only the driver scanner in devices and printers.  Ok.  Connected the printer to the power.  Was left unplugged USB port.  At the printer.  Plugged in USB then and of course the printer showed in printers and devices as well as the scanner set previously.  Software Dell will print its own test page.  But the printer has a yellow exclamation mark on it and on hover Windows reports "Driver is unavailable".  So that failed.

    Use the Vista 64 bit driver set?  Check the print queue and the Windows Test Page shows "Printing error" and I erased only through Windows.  I have re-directed the Dell printer clean utility.  Once again a long long wait (I went to lunch) and came back to this same panel "Please Wait".  Because I didn't know how long to let it run again, I killed him.  At least half an hour.  Disconnected USB printer and the wall.  Then, I downloaded and run the 64-bit set of drivers for Vista.  Yet once, it crosses looking like it installed correctly.  Printers and peripherals shows the scanner only - I think that's normal.  Printer media leave for 5 minutes.  Key for 10 seconds. Printer back up, looks very good.  Introduced the USB printer.  After a few moments checking printers and devices and the printer upwards, but once again with a yellow exclamation point and hover shows "Driver not available.

    What is the assessment here?  What hurts and what I can change in terms of the sequence of the application of this set of drivers or software?  And more importantly, which one should I use: 32 or 64 bit?

    Hoibie

    With 10 windows and the Dell AIO 966, I was able to print test pages but nothing else. While the I'll still get protection faults trying to reach the printer properties, initially cancelling the warnings and to decline the invitation to install the driver (again), I finally get to the properties of the printer. By selecting the 'Advanced' tab, the default setting for the print processor was "GLT", so I changed it to "NT EMF 1,008" and it prints very well. " Still some problems with rundll32.exe errors, but now they are a nuisance, but otherwise everything works.

  • Stretching from full screen and setting the update hack?

    Hey, we have a screen that currently extends to full screen and passes a delegate from Manager custom in the constructor. It seems that tests on some devices do not focus to the first element in the domain manager. After a few I found that the substitution of the onUiEngineAttached method and explicitly debug calling setFocus, it seems to do the trick (it sets the focus on the first field). But I'm worried it's maybe a 'hack' for something else that can't be done directly in the interface. Everyone knows this? When I call super.onUiEngineAttached and enter in the method it seems to be a no - op (it simply returns.)

    Thank you

    arkadyz, thanks again for the helpful answers. Finally, I created a small sample to get to the bottom of this issue and it turns out that the onFocus method is called onDisplay. In our class, the onDisplay was substituted and only called super.onDisplay for 4.2.1 and 4.3.0 4.5.0. Devices etc. 4.6.0 4.7.0 and 5.0.0 the super.onDisplay never been called, and therefore onFocus was never called. After calling super.onDisplay on 4.6/7.0 and 5.0.0 the onFocus now seems to be called correctly.

    If I made anything, please let me know.

    Thanks again.

  • Candle hover button in Flex focus problem

    Hello

    I do not know if someone have experience this, but if we do app using flex mxml actionscript and use the power of flex button, the hover accent color will disappear after copy paste see the pop-up window.

    This allows to simulate inside the flex flex app create a mobile application. A switch of ignition and a textfield or textinput. Then run hover over the button, you can see consulted them who turn to the color blue. After this click within the textfield or textinput to the copy paste see the popup and hover over the button again. Now the stationary accent color is missing, and even if we click on the animation click also lack.

    So is this a bug in flex or have no work around?

    Thank you

    
    http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
    
        
            
        
    
        
            
        
        
        
    
    

    Here is my code that I did it for the test, the only difference is that I place an event to see if the button still worked and I id of the object textfield so I could access it. The button in the pressed state in fact not appear, but the event is still raised.

  • Can break some intersections Guide and not others

    In Illustrator CC 2015, I run the questions where I can snap to intersections Guide (90 degrees, a vertical guide and a horizontal guide) but not others. The two intersections are on a single vertical line. I have unlocked all the guides, and brought them all to the front layer (just in case where what matters) and still nothing. When I select the pen tool and hover on the intersection A, the pointer snaps to the intersection, the indicator displays "intersect". When I select the pen tool and hover on the intersection of B, the cursor follows the horizontal Guide, but as soon as I get near the intersection, it stops after the guide, as if the intersection is pushing the snap.

    Is this a problem of layers? If I move the vertical line (not the Guide) at the intersection of B away, I can line up the intersection to Guide very well. All Guides are arranged for the 'front' (right-click > reorganize > bring to front). The cursor does not follow the vertical Guide at the intersection B at all for some reason any. I'm baffled that I can't get the reliable behavior in identical situations, and I can't find a way to fix and more to remove the vertical line, which should play second fiddle to the Guide!

    My preferences are:

    Selection and display of the anchor:

    Tolerance: 3 px

    Checked the selection of object by trace only

    Snap to Point: 8 px

    Checked the Ctrl-click to select objects behind

    Guides:

    All boxes checked except for measurement labels

    Alignment of tolerance: 4 pt

    You have any 3rd party utility or a Tablet?

    My Mac cc2015 is good to work and get the intersect, even with your settings. Your settings are customized, I recommend you to reset your preferences.

  • Try learning the Roto Brush tool and I'm stumped.

    OK, I have watched videos, read the help but can't seem to get to the stage of learning Roto Brush tool. I have started a project, imported a video in a model and that's all there is in the project. highlite the window comp, click the Roto Brush tool and hover over the video to work. Show the video, the cursor changes to let you know the Roto Brush tool is activated and ready to go, but mine is just the cursor and if I click to draw, he thinks that I want the video and just grab it and it moves. What on earth am I wrong here? After effects CC, all this so far.

    OK, a new cloud just update and restarted his work... all of a sudden.

  • A simple mouse hover over the menu/chart button. The code?

    Hi ecveryone,

    I was wondering if anyone has a code for a mouse simple reversal.

    I am creating a menu wher you hover over menu items

    an image appears.

    I'm new on this and my code language corresponds to the language of a baby...  :-)

    I have bakery 2 pictures:

    1. menu button

    2. the photo to the reversal.

    Thx to 1 million.

    Tim

    Antwerp-Belgium

    menu_demos.pngro_demos_09.png

    Hi Tim,.

    (1) your transitions have a very wide range in pixels (about 1400, why so much?) in a very short time (why don't you start not to 0 ms?), so that there is no visible sliding of the graphics and the interpolation makes disappear instantly!

    (2) sym.getSymbol("ro_contact"), but you have no ro_contact symbol! You must encapsulate the ro_contact existing items in a symbol and build two States labeled normal and hover (or what you want).

    (3) mouseout/mouseouthandler() and mouseover event handlers are not attached to the item well: it should be ro_contact instead of menu_contact. The element that is hovered over (ro_contact) change its status to get high. The other element (menu_contact) is revealed (show()).

    Instead of masquer() and show(), you could use sliding jQuery methods: http://api.jquery.com/category/effects/sliding/

    or animate(): http://api.jquery.com/category/effects/custom-effects/

    (To fix the 2 points) and 3), please read carefully the example that I you provided.

    As the Chinese proverb: "sin to you, I feed you someday." Learning you fishing, I will feed you your life during. "

    Gil

  • How to hide the Alt description when you hover over your links?

    I was told that you must have a description for images, links to just about everything. But when I saw my Web site and hover over the links, a yellow box will appear with the description of the images. How can I hide this?

    You're seen with an old (very old?) version of Internet Explorer, which is the only browser on earth that does what you describe.  All other browsers follow the rules and leave only alt attribute values (what they do).

    You can choose to ignore it, or 'kill' by adding a title attribute which is empty, for example,

    foo

    In addition, you add alt attributes to images for accessibility reasons.  People who browse with images turned off (and there are) or the people who use the devices and accessories functional screen (screen readers) need some indication that there is a picture in the place where they are to search/playback.  Therefore, you only want to add content to these alt attributes, where it is important to the message of the page (that is, a cosmetic image only would just a value of an empty alt attribute). And you only need them for pictures, not for any other element of the page...

Maybe you are looking for

  • any chance to find lost iphones?

    Hi, my daughter and I lost two iPhones in exactly a week - an Iphone5 16 Gb and Iphone 5 s 34 GB - in Vienna. Both phones have been locked by a password but had almost no stack at time of loss / that stolen while. Is there a chance to find them? If t

  • HP Envy 15 t (G0T59AV): HP Envy laptop speaker poor sound quality (particularly acute) as the volume increases.

    I had been without my HP Envy laptop a few weeks after he bricked on me and I had to send in for repair, and when I came back the sound quality seems to be noticeably worse than what I remember. The sound in general seems a little intestine initially

  • LabVIEW: Memory is full

    Hello world! I've implemented a treatment algorithm of image enlarged in LabVIEW using lots of Matlab code imported across Mathscript node and when I finish the implementation of the algorithm that I discovered that it works very well for a small num

  • I lost my activation key for Vista

    In a gesture, I lost the box in windows Vista, but I still have the CD. When I upgraded my old XP computer on Vist drive, he asked an activation code, but I don't have it. Is there another way? I called Dell and they can help.

  • Driver HP Laser Jet P2015dn

    Hi all I have HP Laser Jet P2015dn printer, after the installation of the driver for MS Win7 64 bit HP Universal Print Driver for Windows PCL6 available at the link below: http://h20565.www2.HP.com/portal/site/hpsc/template.page/public/PSI/swdHome/?s