Button State Affected by Windows XP Display Settings

I have a reference to a 3rd party class that extends JToolBar. I am trying to set one of the buttons in this
JToolBar to "pressed." I know the action class for the specific button I am looking for so I just iterate across
all the (abstract) buttons in the toolbar's button group. (See code below.) When I find the button whose
action is the one I am looking for I call setSelected() on the button.
Here is where it gets wierd.....
I am running Windows XP and, if I change the Appearance Windows and Buttons mode** to
"Windows XP" style the code works fine (the button gets depressed programatically). However,
if I change the mode to "Windows Classic" style the button no longer gets depressed.
Any ideas as to how the windows mode could be affecting my code???
Thank you,
Michelle
** right click on the desktop and select "Properties" go to the "Appearance" panel and select from
the "Windows and Buttons" pulldown menu.
Enumeration buttons = mapToolBar.getButtonGroup().getElements();
while (buttons.hasMoreElements()) {
AbstractButton button = (AbstractButton) buttons.nextElement();
Action action = (Action) button.getAction();
if (action == MyButtonAction) {
button.setSelected(true);
break;
}

You might want to check with third party who developed the toolbar extension.
I would also try a small test program using only out-of-the-box Swing JToolBar to see if you get the same result.
Hope that helps
DB

Similar Messages

  • [Bug?] Windows display settings causes boolean text to overshoot

    I built a program and transferred it to a coworker to test. When he opened it, there were several visual glitches including boolean button text and multiple y axis plot issues. After several hours of troubleshooting, I realized it was because I had my graphics settings on my desktop slightly different.
    If you right click (Windows 7) on desktop -> personalize -> display, you will see an option to "Make it easier to read what's on your screen".  Default in Win 7 is 125%.  This sets LabVIEW application font to 20 instead of 15 (like 100% and 150%) do.  As a result, it changes the look of your application.
    Has this been observed before, and is there a fix?  note:  It also causes visual glitches on within LabVIEW development UI itself. If you look at the "Med (125%)" attached png, you will see that the bottom of Application Font" has been chopped off.
    Attachments:
    Small (100%).png ‏37 KB
    Med (125%).png ‏36 KB
    Large (150%).png ‏113 KB

    Hi Bowen,
    I can't open your pics, all I get is an error 400…
    Your problem is a common one. Changing display settings in Windows has an impact on LabVIEW front panels due to changing font sizes. You have to live with it or you have to account for when designing your front panel!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • I have Windows 7 with classic desktop display settings. My browser window is displaying in the system scheme, even though I have "Use system colors" unchecked and "Allow pages to choose their own colors..." checked.

    ''Duplicate post, continue here - [/questions/777317]''
    This is interfering with my browsing, as some text, images and links are obscured by the solid background. I could, of course, use the modern "Aero" theme but it would be much better to be able to use the display settings that I prefer.

    That's a painful example. I don't have access to Windows 8/8.1 myself, but I suspect this is by design, as I have seen other screenshots from users using high contrast dark themes that did not have background colors and images.
    Firefox 32 contains a change from this bug: [https://bugzilla.mozilla.org/show_bug.cgi?id=1042625 Bug 1042625 - Page should be drawn in accordance with the high contrast themes]. The testing (and a comment in the patch) refers to solving a problem on Windows 7, but apparently Windows 8 also was affected.
    I don't know whether there is a workaround to tweak what is and isn't displayed in the page with a high contrast theme.

  • Display settings in System Preferences acting up

    I'm having trouble with my Display settings under System Preferences. I am not using an external monitor. My display seems to be working fine, but when I open Display settings to change resolution and colour, weird stuff happens. Basically, I cannot use this preference pane at all.
    My display is 1920x1200, but when I open the Display settings, I get two windows, one telling me that "I am about to change [something something], some applications cannot display information correctly if the screen has less than 800x600 pixels", and the other one, the usual main window, telling me that my resolution is now 640x480 (it isn't).
    If I hit OK in the extra window that pops up, my resolution changes to 640x480 or something similar, and I am unable to change back unless I reboot. Also, in the main Display settings window, it says <<< DO NOT LOCALIZE >>> under the list of available resolutions, as well as << do not localize >> in the box where I can change refresh rate. None of the buttons seem to be working.
    Does anyone have any idea what is going on here? This was working just fine when I received my new MacBook Pro a few days ago, but now it's not. I've been repairing disk permissions and rebooting, etc.
    I have been installing the trial version of Adobe CS5, but had massive problems with this installation (as a lot of people are reporting with CS5 and Snow Leopard...) and uninstalled them again, cleaning out Adobe preference files. Could I have deleted some other important files by accident in this process?

    Quit System Preferences, then delete these files or folders.
    Users/yourname/Library/Preferences /com.apple.systempreferences.plist
    Users/yourname/Library/Preferences/By Host/com.apple.systempreferences.xxxxx.plist and com.apple.PrefPane.Network.xxxxx.plist (the X's will be numbers)
    Also, Users/Home/Library/Caches
    Now relaunch System Preferences. Let us know.
    -mj

  • Odd desktop/display bug - how to reset user display settings?

    Greetings all,
    I woke up yesterday morning to a puzzling problem with my G5. I logged in and started working - and I needed to use the windows remote desktop client to shell into a machine at work. I noticed that the fonts looked sort of funny (randomly quished) so I logged out and then back in. Then I noticed that the problem was not in the RDC display, but in the display of my mac.
    This is sort of hard to describe w/out actually seeing it, but here goes...
    When I move my mouse across the desktop (or what ever apps I have open) and the mouse pointer moves across and invisible (yet perceptible) line on my screen real estate, my background, icons, parts of displayed apps and fonts "shift". This causes fonts in the affected are to get messed up and causes general display irritation. That's the best way I can describe it, it's sort of a "you have to see it" problem. I will also note that this problem did not arise after an update or a software install or weird crash. Just another day.
    So first I tried messing with my display settings (change resolution, color profiles, setting the background to a solid color, turning off screen saver). Rebooting. Nothing. Still there.
    So next I log into another account (the root account). Ah ha! No display problems! Tried creating another user-level account. No problems there either. Now we're getting somewhere - it's something that is effecting my main user account and not a problem with my monitor, video card or OS. That's good.
    So since then I've tried:
    - Grooming the disc that my home directory lives on with DiskWarrior.
    - Repaired permissions.
    - Deleting the contents of home/Library/Fonts in case it's some funky font rendering issue causing this.
    - Deleted the contents of home/Library/Preferences/MicroSoft to get any of its potential badness out of my life.
    - Scanning with FontDoctor looking for bad fonts.
    - Deleted my desktop and finder plist files.
    - General maintenance and cache cleaning (including the MS font cache) with Onyx.
    - Booting to Safe Mode.
    Nothing. The display problem persists afflicting that one user account. All other accounts (root, and a second user-level account residing on the same disc) are free of these problems even though they are all using the same display settings (monitor, resolution, color profiles, etc). And as already noted, this problem was not "brought on" by anything like an update, installation, preferences modification or fatal seeming crash of an app.
    So, my question to all you good people is: what am I missing, what might be causing this and what else can be scrubbed from that account (cache, plist files, etc etc) that might be harboring and causing this display bug? I would really rather solve this problem than go through the very very arduous task of moving all of my stuff to another account (an option, but a very unattractive one).
    I was not a mac user during the OS 9 days, but I remember my co-workers doing the "rebuilding the desktop" dance. I realize that this is no longer an issue, but I guess I'm looking for something like that. I need to remove any and everything from my user account that has anything to do with display and font rendering since it's obviously some setting lurking in that account causing the issue.
    I googled and searched the forums for this yesterday but could not come up with anything like it and all of the maintenance tasks I tried have not worked.
    Any ideas?
    Cheers,
    Monte
    G5   Mac OS X (10.4.9)  

    Hi.
    What kind of G5 do you have? An iMac or a PowerMac?
    A PowerMac.
    If you own a PowerMac, you'd better take a look (o
    try with another one) at the DVI cable connecting the
    display.
    I did check my connections, but also, why would a faulty DVI cable only cause problems with a single user account and none of the others?
    If you want to reset the display settings, start in
    Safe Mode, and trash these files:
    /Library/Preferences/com.apple.windowserver.plist
    /Users/yourusername/Library/Preferences/ByHost/com.a
    pple.windowserver.some_number.plist
    If I were at home now, I would try and report back. But I'm not. I'll definitely give it a try as soon as I can. Thanks for the pointer!
    Cheers,
    M

  • Use GPO to set default language options, IME, display settings?

    new to GPO, we have a small Windows Server 2012 domain, all clients on Win7 or Win8.  All the clients require the following changes, anything I can automate this with GPO?  thanks
    Under Control Panel\Clock, Language, and Region\Language > Add Traditional Chinese HK SAR
    Under Control Panel\Clock, Language, and Region\Language > Traditional Chinese HK SAR > Options, Add Microsoft Quick IME
    Under Control Panel\Clock, Language, and Region\Language\Advanced settings - change language bar hot keys
        - CTRL+SHIFT+0 ------  To English (United States) - US
        - CTRL+SHIFT+0 ------  To Chinese (Traditional, Taiwan) - Microsoft Quick IME
    Under Control Panel > Region > Advimistrative > Change System Locale...  change to Chinese HK SAR for non-unicode programs
    Control Panel\Appearance and Personalization\Display > Change the size of all items, use custom 123%.
    Control Panel\Appearance and Personalization\Display > Update Text size to 8 for Title bars, Menu, Message Boxes, Icons, Tooltips
    I found this for the display scaling registry changes but it is for 125% and it uses 78 for the dword value, not sure about custom 123%.
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/882f17a6-7465-4aa6-8cea-27aa37a28a4d/gpo-to-set-default-windows-7-display-scaling-to-125?forum=winserverGP

    Hi lilyl,
    According to your description, you would like to deploy some settings about language and display via GPO.
    According to my knowledge, the steps you provided are from Windows 8 clients. Based on my test, you can use the following methods to realize:
    Add Traditional Chinese HK SAR. Locate the registry key HKEY_CURRENT_USER\Keyboard Layout\Preload, and then add a String Value "next number"(which has not been used)=00000404.
    The region settings. Please refer to the similar post:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ec6a290e-fc09-4be6-9f6a-1f532d338606/change-regional-settings-locale-settings-and-keyboard-layout-using-group-policy?forum=winserverGP
    The display settings. The post you provided tells us the related registry keys, and you should try to find the right value since you want to custom it.
    In addtion, please refer to the following article to learn to deploy a registry item:
    http://technet.microsoft.com/en-us/library/cc753092.aspx
    Regards,
    Lany Zhang

  • How do change the display settings such as color temperature and backlight brightness on an iMac monitor?

    My wife has an iMac (I don't know any other way to identify it e.g. model number), and she has this 3rd party calibration software that I'm trying to use. I am not used to a Mac, and I cannot find the display settings for the monitor. There are no buttons on the monitor, and when I go to preferences, I can only find the brightness control. I've googled this and cannot find a clear, simple answer. I have used every version of Windows (currently on 8.1 on my PC) and it's easy for me on that platform. I suppose it's just that I don't really know how to navigate Mac OS.

    ItsameMatt03,
    Choose Apple menu > System Preferences, click Displays, then click Color.
    Click Calibrate.Display Calibrator Assistant walks you through calibrating your display, then creates a calibrated color profile.For a more detailed calibration of your display, select the Expert Mode checkbox, which is at the bottom of the introductory text in the assistant.When the display profile is ready, it’s automatically assigned as your display’s color profile.
    Support Articles,
    If your Display doesn't look right: https://help.apple.com/machelp/mac/10.10/index.html?localePath=en.lproj#/mchlp29 06
    Calibrate Your Display: https://help.apple.com/machelp/mac/10.10/index.html?localePath=en.lproj#/mchlp11 09
    I hope that helps,
    Weston

  • Restoring original iMac color/display settings??

    I was tinkering around with the display calibration and somewhere along the way the original display calibration was saved over and now I'm stuck with several versions of displays which all feature too much light. The places this is most obvious are on the brushed metal interfaces, where it appears there is a light source centered on the window, making a lighter colored reflection of sorts. I was hoping to restore the original settings for the display, but have been unsuccessful on my attempts so far. If anyone can help me out before my retinas detach, I would greatly appreciate it.
    Thanks.

    Unfortunately, it appears that one of the profiles I changed was the factory setting, and the original factory setting has been saved over. One less than perfect solution I've come up with is creating a new account. The display settings for this "Test" account I set up and have begun using more and more has the original calibration set up and looks perfect. An interesting observation is that the other profiles I set up are accessible from this account, and when chosen look much closer to normal than in the previous account, where it was as if the white point or brightness was increased quite a bit, creating almost a white-out effect on the brushed metal interfaces, aqua buttons, and worst of all webpages with whites and grays (like apple.com), where I could barely make out the silhouette of the Mighty mouse.
    If anyone has an alternative way to restore the current account's display settings to the old account, please let me know b/c I would hate to have to complete this transition to an entirely new account.
    Thanks again.
    - Billy

  • Unable to save display settings and Multiple Monitors

    Have Windows 7 RTM installed on my laptop and was working great with extending to my monitor. I took my laptop home and hooked it up to my tv and it was fine. Now when I bring it back to work I cannot get the monitor to work. Only the display on the laptop is working. Windows can detect the monitor, but I try to enable the monitor and when I select Apply I get an error message "Unable to save display settings". I am a local administrator on the laptop. How can I extend to my monitor!
    Thanks

    Hi,
    Error message " Unable to save display settings" mainly indicates that you try to extend or duplicate the desktop to the two external monitors in addition to the laptop screen. Generally, laptop supports only two displays at one time due to hardware limitation. I
    suspect that the issue occurs because the laptop remembers both configuration for your extended monitor and TV. To extend your monitor, you need to clear the multiple configuration for your laptop and then extend your display by changing your display
    settings. To do this, please take the following steps:
    Step 1. Delete registry key.
    ==================
    1)Press Win + R to open a run box.
    2)In the Run box, type regedit, and then click OK.
    3)Locate the following registry subkey:
    HKEY_CURRENT_USER\Software\Microsoft\MobilePC\TMM
    4)Right-click the subkey that you located in step 2. Then, click Delete.
    5)When you are prompted to confirm the delete operation, click Yes.
    6)On the File menu, click Exit to exit Registry Editor.
    7)Log off the computer. Then, log on to the computer.
    Step 2. Extend your display by changing display settings.
    ====================================
    1)Open Screen Resolution by clicking the Start button , clicking Control Panel, and then, under Appearance and Personalization, clicking Adjust screen resolution.
    2)Click the drop-down list next to Multiple displays, click Extend these displays, and then click OK.
    References:
    KB 973782
    Best Regards
    Dale Qiao
    This registry key does not exist in my Laptop and it still won't work.  I have an Asus N53S
    which has both Intel HD Graphics 3000 and an NVidia GeForce GT 540M.  It appears that the limitation is actually there is no D-Sub / HDMI  / Internal Monitor option like there is in Windows Display.

  • Object-level display settings not working in CS5

    I can't change display settings at an object level in an InDesign document, if I want to change display settings it will only work at the document level. If I try to change at object-level nothing happens. This is on a high-spec Windows 7 64bit with Nvidia GeForce 470, with up-to-date software & drivers, running InDesign 7.0.2.

    Since I can't reproduce the problem here, at least so far in limited testing, I don't know where to point you or what might be affecting the frames in question. Can you copy a few of these frames onto a new page, verify that the problem still exists, then zip the page (you can delete the images, just leave the frames), and post it on a server someplace like YouSendIt.com, then post a link here?
    It might not be something that you can fix except by replacing the frames. If that's the case, it might be possible to script the replacement.
    Oh, I just thought of one other test. Have you tried cutting the image itself, using the direct select tool, and pasting into a new frame? that also will help isolate the problem as the frame.

  • Login Window stuck displaying "List of users"

    The Login Window app on my PowerBook (OS 10.4.6) suddenly stopped taking changes to preferences. Things like auto-login, displaying the Reboot/Sleep/Shutdown buttons, showing the list of users vs. the user/password prompt, etc. have been changed in the Preference Pane, but upon logout or reboot the changes have no effect. This is really a problem, as I want the login window to display the user/password prompt rather than the default list of users for privacy. I've followed the instructions posted elsewhere for fixing the auto-login problem (boot into single-user mode and delete the appropriate plists/caches), and it had no effect. Any help anyone could render would be appreciated.
    PowerBook G4 (15" DL-SD)   Mac OS X (10.4.6)  

    I tried the commands you've listed. Upon checking the com.apple.loginwindow.plist files, I noticed that the changes ARE being made to the file, but loginwindow.app is flat-out ignoring the settings. As for the stuff I tried earlier:
    Boot into Single-User Mode
    /sbin/fsck -fy
    /sbin/mount -uw /
    cd /Library/Preferences
    rm com.apple.loginwindow.plist
    rm com.apple.windowserver.plist
    cd /Library/Caches
    rm -r *
    cd /System/Library
    rm Extensions.kextcache
    cd /System/Library/Caches
    rm -r *
    reboot
    ...and after this had no effect, I deleted the loginwindow plists listed above several times from the Finder to force loginwindow.app to regenerate them.
    It seems like my problem has evolved slightly since my first post. At first, changes made in the Accounts preference pane would have no effect on the contents of /Library/Preferences/com.apple.loginwindow.plist. Now, the changes ARE made in the file, but loginwindow.app does not heed them. Any ideas?

  • Monitor says VIDEO MODE NOT SUPPORTED after changing display settings

    HELP! I am about to have a nervous breakdown with my mac mini! I hooked up the mac to my Philips LCD via DVI. No problem at all. But because the screen is only 15" I wanted to play around with the display settings a bit. So I changed the resolution from it's original 1204x768 to the one higher (not sure of numbers) and to my HORROR, I now can't get any picture at all - it says "VIDEO MODE NOT SUPPORTED". I have tried everything I can think of. I have rest the P-RAM, I have unplugged all cables, plugged the back in again, I bought the mac into work and hooked it up to my monitor and changed the resolution back to 1024x768 which is what it was on originally and that STILL didn't work. I can see the Apple logo and then it goes black and comes up with the error message. HELP! What am I doing wrong - I can't believe one click of a mouse button has rendered my display useless!!!

    Welcome to Apple Discussions!
    Try booting the mini without the display connected, and then, once the system is running, connect the display. This will often force the system to default to a low resolution, and then correctly detect the display when it is connected.
    If that doesn't help, with the display connected, boot into safe mode (hold the shift key down when starting up) and once the system is running, change the resolution to 1024x768, and ensure the correct refresh rate is selected. Rebooting normally ought then to give you a good display.
    If all else fails, boot into safe mode with the display connected, and then in the Finder's file menu, use the 'find' option to search for 'windowserver' (no quotes). You should get 2 or 3 results, including one with a string of alphanumeric characters. Move all of them to the trash and restart normally.

  • HT5219 how do i get my macbook pro 13" retina to keep its display settings the same when I unplug it from my thunderbolt 27" display?

    I have just bought a macbook pro 13" with retina display and a 27" thunderbolt display to go with it.
    I plug in the display, set it all up to the look and format that I want to use (same for both displays, I am using the mirroring feature), and then when I unplug the macbook from the 27" display it's settings revert and I can't see half my windows as they fall off the edge of the smaller macbook screen.
    Is there a way to make the macbook keep the same display settings, even when I unplug it from the 27" display?

    Not that I know of... but if someone comes along with a method, I would certainly be interested...
    Clinton

  • Want to open a new browser window and display the html file in locale disk.

    Hi,
    I want to open a new browser window and display the html file in local drive. The below html applet work in local system successfully. But i deploy the same in web server (Tomcat) and try the same in client machine it does not work. Please help.
    Note:
    The class below fileopen.FileOpen.class i make it as a jar and put it in jre\ext folder at the client machine.
    ------------------------------------FileOpen.html(Tomcat)-----------------------------------------------------
    <html>
    <body >
    <applet code="OpenFile.class" archive="loadfile.jar" width="100" height="100">
    <param name="path" value="file://c:/open.html" />
    </applet>
    </body>
    </html>
    -------------OpenFile.java in server(Tomcat)--------------------------------------------
    public class OpenFile extends Applet implements ActionListener{
    String path = "";
    fileopen.FileOpen open = null;
    Button b = null;
    public void init(){
    path = getParameter("path");
    b = new Button("Open");
    b.addActionListener(this);
    add(b);
    public void actionPerformed(ActionEvent ae){
    try
    open = new fileopen.FileOpen(this,path);
    catch (Exception e){
    e.printStackTrace();
    -------------------------------------------FileOpen.java /Client JRE/ext----------------------------------------------------
    package fileopen;
    public class FileOpen
    AppletContext context = null;
    URL url = null;
    public FileOpen(Applet applet,String path)
    try
    if(null != applet){
    context = applet.getAppletContext();
    if (null != path)
    url = new URL(path);
    context.showDocument(url, "_blank");
    }catch(Exception ex)
    ex.printStackTrace();
    Please help to solve this issue very urgent.
    Thanks in advance.
    By,
    Saravanan.K.

    zzsara wrote:
    I want to open a new browser window and display the html file in local drive. ...Did you ever pause to consider how ridiculous that is?
    The best audience for applets is people off the internet. 'People off the internet' might be using a computer that has no (what was it?) 'open.html' in the root of the C: drive. In fact (shock horror) they may not even be running Windows, and would therefore probably have no 'C:' drive at all.
    If you do not intend to distribute this to people off the web, an application makes a lot more sense, but even then, you cannot rely on the document being there unless you 'put it there' (during installation, for instance).
    As the other poster intimated, applets can load documents off the local disk as long as they are trusted. Here is an example*, but note that it is not so rash as to presume any particular path or file, and instead leaves it to the user to choose the document to display.
    * The short code can be seen at SDNShare on the [Defensive Loading of Trusted Applets|http://sdnshare.sun.com/view.jsp?id=2315] post.
    On the other hand, a sandboxed applet can load any document coming from its own server via URL, or get showDocument(URL) to work. In that case, the JRE must recognize that the URL is from its own server, so the best way to form URLs for applet use is via the URL constructor
    new URL(getDocumentBase(), "path/to/open.html");That is how I form the URL in this [ sandboxed example of formatting source|http://pscode.org/fmt/sbx.html?url=/jh%2FHelpSetter.java&col=2&fnt=2&tab=2&ln=0]. Of course, in this case the applet loads the document, then parses the text to draw the formatted version, but the point is that an URL produced this way will work with showDocument(URL).
    I am pretty sure showDocument() in an applet off the internet will work with an URL pointing to a foreign (not its own) server, but it will not be able to load documents off the end user's local disks.
    I suggest a couple of things.
    - Try to express this problem in terms of what feature it is that you want to offer the end user. Your question jumps directly to a bad strategy for achieving ..who knows what? An example of a feature is "Shows the applet 'help' files on pressing F1".
    - A good way to indicate interest in a solution is to offer [Duke stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview] to match that interest.
    Edit 1:
    ..and please figure out how to use the CODE tags.
    Edited by: AndrewThompson64 on Sep 12, 2008 11:14 PM

  • My screen will no longer turn on, how do i reset my display settings on mac pro

    Hi, i'm using a mac pro and cinema HD display, the display was usually set to using the power button on the side as an actual power button, i decided to change it to turn computer sleep mode on and off and it still worked fine whilst it was on, i then turned the set off for the night, the next day the screen did not come on with the computer and i cant turn the screen on becuse the button is set to sleep the computer. Any way to reset my display settings or turn my screen back on?. thnks

    nevermind solved

Maybe you are looking for

  • Tools palette in tool bar

    Hi, I'm a comparative new-comer to LabVIEW so this might have been discussed long ago.  Question: why not have the tools palette along the top, in the tool bar where there is lots of empty space? Even the functions palette for the LabVIEW block diagr

  • Dynamic partnerlink binding problem

    I am trying to create a dynamic partnerlink as in http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html . When I am trying to create this with LoanService.wsdl, it works correctly for me but when I try to create it for my own service

  • Appslocallogin not working....

    Hi, During cloning ....after the changing of APPS and SYSADMIN password using FNDCPASS...Appslocallogin is not working ... but access through dev60cgi/f60cgi is working... Earlier Appslocallogin was working fine.... After the change i had updated APP

  • Equivalent of Informix's onstat command

    Is there a equivalent of onstat command line in Informix ? onstat helps give lots of information like: - Session id and the sql that session is currently executing. - Gives the space left in tablespace - Threads in waiting, sleeping state - Informati

  • HT4528 i want to disable texting while driving on my sons iphone4, can this be done?

    i want to disable my son's iphone for texting while driving.  I can find apps for droid and blackberry but not the iphone.  does this exist for iphones?