DateField, HorizontalFieldManager + ObjectChoiceField = error

I am creating a page layout so that there a datefield and objectchoicefield in the horizontalfieldmanger even, and it throws me illegalarguementexception every time. Can someone help me? Here is the code example.

HFM HorizontalFieldManager = new HorizontalFieldManager();
HFM. Add (new DateField ("Some Text:", Date () .getTime (new),))
DateFormat.getInstance (DateFormat.TIME_DEFAULT)));

HFM. Add (new ObjectChoiceField ("", new String [] {"some", "text"}));
Add (HFM);

The problem here is that the DateField occupies the entire width.  The ObjectChoiceField then try to deal itself.  He seems to be referring to the treatment of layout of a RichTextField and pass the width that it must work, and the string to be converted (in this case, it is "a little").  RichTextField barfs with an Exception, because there is no way that 'some' can fit in the space provided (-1 pixel).

To get this working, you have to find a way to limit bandwidth claiming the DateField.  I thought you'd be able to do by indicating the field to put his time left (style == DateField.FIELD_LEFT, but which did not work, so I went back to my usual substitutions and created what follows, that works.)

You can take it from here?

HFM HorizontalFieldManager = new HorizontalFieldManager();
HFM. Add (new DateField ("Some Text:", System.currentTimeMillis (),))
{DateFormat.getInstance (DateFormat.TIME_DEFAULT))}
public int getPreferredWidth() {}
Return to 150;
}
Protected Sub layout (int width, int height) {}
Super.Layout (getPreferredWidth (), height);
}
});
HFM. Add (new ObjectChoiceField ("", new String [] {"some", "text"}));
Add (HFM);

Tags: BlackBerry Developers

Similar Questions

  • Put two ObjectChoiceField side by side

    Hello

    I tried to put both components in a HorizontalFieldManager ObjectChoiceField, but I can't view both on the same line, it seems that the other is pushed off the screen to the right.

    I tried with Manager.NO_HORIZONTAL_SCROLL nothing works.

    Can anyone please help me;

    Thank you very much

    You can limit the width of one of them. These two talk on this subject, but for the different types of fields:

    http://supportforums.BlackBerry.com/T5/Java-development/can-t-put-BasicEditField-and-button-side-by-...

    http://supportforums.BlackBerry.com/T5/Java-development/please-help-with-trying-to-put-a-BasicEditFi...

    But if you are sure that they will hold next, you can set one on the left with the style

    Field.FIELD_LEFT and I think he'll try to stay as close to the left as it can.  Give it a try.

  • pushed single screen several times on display battery but can not go back to the previous screen again by clicking on "back" to come to the first screen button

    Hi all

    There is a screen with meter as label, datefield and objectchoicefield in the menu drop down and add and go button, this screen is pushed repeatedly on display battery until the meter is new. But when I try to go back to the previous screen, there is problem normally by substituting the onClose() method you can pop current screen and can get the previous screen, using getActiveScreen() and then push it again if you do not override os onClose() automatically do it for you.

    But in above case when I click on the button "back" or screen previous override onclose and push, I see my first screen I wanted my current screen with the counter that is if active screen is having against label like new if I press the "back" button, it should display screen with the meter only eight and so on.

    Can someone please help me solve this problem.

    Thanks Peter for you answer, actually used function for pushscreen on stach display that was written by someone else, when I looked carefully there condtion as below,

    if (activeScreen != null) {
     Class screenClass =activeScreen.getClass();
        if (screen.getClass().equals(screenClass)) {
                        UiApplication.getUiApplication().popScreen(activeScreen);
        }
    }
    

    It's actually the previous screen of poping before push the screen from the class were same, just commented and everything works, even if you do not override onClose and press return, it will automatically displays the previous screen.

  • Question of RadioButtonGroup in OS 6

    Hello

    The piece of code works well on Blackberry OS 4 and 5 but doesn't show the 'Female' in OS 6 radio button option.

    LabelField genderLabelField = new LabelField("Gender:");
    RadioButtonGroup, radioButtonGroup = new RadioButtonGroup();

    RadioButtonField maleRadioField = new RadioButtonField ("Male");
    RadioButtonField femaleRadioField = new RadioButtonField ("Female");

    private VerticalFieldManager createUI()
    {
    VerticalFieldManager vfmForm = new VerticalFieldManager();
            
    joinf2fLabelField.setFont (F2FFontUtility.smallBoldFont);
    joinf2fLabelField.setMargin (0, 0, 10, 0);
    vfmForm.add (joinf2fLabelField);
            
    firstNameEditField.setMargin (0, 0, 5, 0);
    vfmForm.add (firstNameLabelField);
    vfmForm.add (firstNameEditField);
            
    lastNameEditField.setMargin (0, 0, 5, 0);
    vfmForm.add (lastNameLabelField);
    vfmForm.add (lastNameEditField);
            
    emailEditField.setMargin (0, 0, 5, 0);
    vfmForm.add (emailLabelField);
    vfmForm.add (emailEditField);
            
    passwordEditField.setMargin (0, 0, 5, 0);
    vfmForm.add (passwordLabelField);
    vfmForm.add (passwordEditField);
            
    confirmPasswordEditField.setMargin (0, 0, 5, 0);
    vfmForm.add (confirmPasswordLabelField);
    vfmForm.add (confirmPasswordEditField);
            
    vfmForm.add (genderLabelField);
            
    radioButtonGroup.add (maleRadioField);
    radioButtonGroup.add (femaleRadioField);
            
    HorizontalFieldManager hfmGender = new HorizontalFieldManager();
            
    maleRadioField.setMargin (new XYEdges (0, 5, 0, 0));
    hfmGender.add (maleRadioField);
    hfmGender.add (femaleRadioField);
            
    hfmGender.setMargin (new XYEdges (5, 0, 10, 0));
    vfmForm.add (hfmGender);
            
    vfmForm.add (dateField);
            
    HorizontalFieldManager hfmButtons = HorizontalFieldManager(FIELD_HCENTER | nouveau FIELD_VCENTER);
            
    hfmButtons.add (submitButton);
    submitButton.setMargin (new XYEdges (0, 10, 0, 0));
            
    if(this.currentMode == F2F_TRY_MODE)
    cancelButton.setLabel ("Logout");
            
    hfmButtons.add (cancelButton);
    hfmButtons.setMargin (new XYEdges (0, 5, 10, 0));
            
    vfmForm.add (hfmButtons);
            
    Return vfmForm;
    }

    Can anyone give reason to that, suggests a solution that works for all Blackberry OS?

    I don't know why on each new version of OS RIM of new bugs. I don't speak of situations, these are fairly straightforward scenarios, the OS 5 they SMS API not working and now in the box of 6 option OS not showing.

    If there is a team of QA to the RIM, I do not understand what RIM by paying them.

    I got it to work. This is a bug of Blackberry OS 6, if you have two radio buttons in a HorizontalFieldManager, it wouldn't show the other. You just need to extend the RadioButtonField and use it instead of the original.

    class RadioButtonFieldPatch extends RadioButtonField
    {
        RadioButtonFieldPatch(String label)
        {
            super(label);
        }
    
        RadioButtonFieldPatch(String label, RadioButtonGroup group, boolean selected)
        {
            super(label, group, selected);
        }
    
         protected void layout(int width, int height)
         {
             int pWidth = this.getPreferredWidth();
             setExtent(pWidth, height);
             super.layout(pWidth, height);
         }
    }
    
  • Dynamic choice with ObjectCoiceField

    Hello

    It's me again, I am creating a list with information obtained in the SQLite database using select... OK, but this list should be selectable to select an item in this list, an editing screen appears.

    I use Blackberry JDE 5.0 and I'm not to find ways to make this list.

    I am currently not a list, is an ObjectChoiceField, but I don't get the food choices of information on the components of the database at the time.

    try{
                URI uriBanco = URI.create("file:///SDCard/Databases/SQLite_Guide/" +
                "pentago.db");
                if( !(DatabaseFactory.exists(uriBanco)) ){
                    Dialog.alert("Banco de dados não encontrado.");
                }else{
                    HorizontalFieldManager hz = new HorizontalFieldManager();
                    ObjectChoiceField coletas = new ObjectChoiceField();
                    coletas.setLabel("Coletas: ");
                    d = DatabaseFactory.open(uriBanco);
                    Statement st = d.createStatement("SELECT * FROM Coleta");
                    st.prepare();
                    net.rim.device.api.database.Cursor c = st.getCursor();
                    Row r;
                    int i = 0;
                    while(c.next())
                    {
                        r = c.getRow();
                        i++;
                        int tam = opcoes.length;
                        opcoes[tam] = r.getString(1);
                    }
                    if (i==0)
                    {
                        add(new RichTextField("Nada foi encontrado."));
                    }
                        coletas.setChoices(opcoes);
                        hz.add(coletas);
                        add(hz);
    
                    st.close();
                    d.close();
                }
            }catch (Exception e) {
                System.out.println( "DEBUG: " + e.getMessage() );
                e.printStackTrace();
            }
    

    Tanks

    Your options is not initialized, then the exception generated can be different.

    Once you have your number, initialize the array:

    opcoes = new String[count];
    

    Then, you can use the newly allocated array.

  • HorizontalFieldManager skins ObjectChoiceField

    Hello

    I use a standard HorizontalFieldManager and ObjectChoiceField in my application.

    I add a TextField to the HorizontalFieldManager and then the ObjectChoiceField, I do this rather than using the label of ObjectChoiceField I can 'space' label of choice.

    However, when I do that the ObjectChoiceField is not visible on the screen, blurred or the focus, but it is there because if I focus on it and press the trackball, I can see the choices.

    I beleve I had added the HorizontalFieldManager and the ObjectChoiceField otherwise I would not have the choice.

    Could the ObjectChoiceField paint method be called not because it's in a HorizontalFieldManager?

    Thank you

    David

    I think that the TextField object that can use the full available width, which will push the ObjectChoiceField off the screen to the right. Instead of a TextField, try a RichTextField using the USE_TEXT_WIDTH style. (Which won't help, of course, if the text is too wide for display.) Otherwise, you could eliminate the TextField and set the label of the ObjectChoiceField the text you want to display.

  • 2 at the same HorizontalFieldManager DateFields

    Hello everyone

    Is it possible to have 2 DateFields in HorizontalFieldManager even?

    I tried the following code, did not work.

    Dtfm DateFormat = new SimpleDateFormat("HH:mm");
               
    HorizontalFieldManager hmDisable = new HorizontalFieldManager();
    HorizontalFieldManager hmFrom = new HorizontalFieldManager();
    HorizontalFieldManager hmTo = new HorizontalFieldManager();
               
    dtStart = new DateField ("disable:", System.currentTimeMillis (), dtfm);
    dtTo = new DateField ("disable for:", System.currentTimeMillis (), dtfm);

    hmFrom.add (dtStart);
    hmTo.add (dtTo);

    hmDisable.add (hmFrom);
    hmDisable.add (hmTo);
                
    Add (hmDisable);

    Thank you

    Never mind. I solved it by replacing sublayout.

    Thank you

  • DateField as itemrender causes Error #1034: Type coercion failed: cannot convert '10/03/2006.

    I have itemrende onliner.

    < mx:DataGridColumn dataField = "solddate."
    headerText = "Date".
    itemRenderer = "mx.controls.DateField"
    rendererIsEditor = "true".
    editorDataField = "selectedDate" / >

    XML =

    < solddate > 10/03/2006 < / solddate >

    This translates

    DateField as itemrender causes Error #1034: Type coercion failed: cannot convert ' 10/03/2006' in Date.

    Is it possible for me to be

    1. change the output xml to the required format

    or

    2 convert the data within the itemrenderer

    The answer is here http://blog.flexmonkeypatches.com/2008/04/08/datefield-itemeditor-when-date-is-a-string/comment-page-1/
    
    or you can do it inline like
    
    DataGridColumn headerText="Date"                   editable="true"                    rendererIsEditor="true">                              DateField selectedDate="{new Date(Date.parse(data.@solddate as String))}"/>                                               DataGridColumn>
    
    
    
  • DataGrid, error using DateField as the post editor

    Hello

    I am trying to create a DataGrid editable using Flex 2.0.1. One of the columns is of type Date, so I want to use a DateField as the item editor.

    The problem is that I get an error when the focus is removed from the DateField:

    TypeError: Error #1034: Assegnazione di tipo forzata limpeza no:
    Impossibile convertire "10/01/1980" in Date.
    at mx.controls::DataGrid/::itemEditorItemEditEndHandler()

    It seems that the DataGrid control is trying to assign the value of raw string in my data provider object.

    It is a code snippet that reproduce the problem:

    < mx:Script >
    <! [CDATA]
    [Bindable]
    private var lines: collection ArrayCollection = new ArrayCollection();
    private function init (): void {}
    called on creationComplete
    var testRow:PersonVO = new PersonVO();
    testRow.name = "name";
    testRow.surname = "name";
    testRow.birthDate = new Date (1980, 9, 1);
    rows.addItem (testRow);
    }
    []] >
    < / mx:Script >
    < mx:DataGrid dataProvider = "{lines}" editable = "true" >
    < mx:columns >
    < mx:DataGridColumn dataField = "name" / >
    < mx:DataGridColumn dataField = "name" / >
    < mx:DataGridColumn dataField = "birthDate" >
    < mx:itemEditor >
    < mx:Component >
    < mx:DateField formatString = "DD/MM/YYYY" / >
    < / mx:Component >
    < / mx:itemEditor >
    < / mx:DataGridColumn >
    < / mx:columns >
    < / mx:DataGrid >

    Do you have an idea of the cause of this behavior?

    Thank you
    Cosma

    Hello

    I managed to do works by adding the editorDataField = "selectedDate" attribute to the element of DataGridColumn, even leaving the attribute date of birth on the VO as public Date variable.

    Thanks anyway for the help.
    Cosma

  • ObjectChoiceField throw a Null pointer Exception error

    Could someone help me please.  I have an ObjectChoiceField object that throws a null pointer exception and I know there was another post but I don't yet understand why.  This is how I create the object and fill it with four points.  Thank you!

    lv_loc1 = "Arlington Heights";
    lv_loc2 = "Waterloo."
    lv_loc3 = 'Fort Madison';
    lv_loc4 = "Colorado Springs";
    String [] lv_locs = {'Loc1-' + lv_loc1, 'Loc2-' lv_loc2, 'Loc3-' + lv_loc3, '-Loc4' + lv_loc4};
    int lv_start_psn = 0;
    ObjectChoiceField lv_locChoice = new ObjectChoiceField ("", lv_locs, lv_start_psn, LabelField.FIELD_HCENTER)
    {
    public void layout (int width, int height)
    {
    Super.Layout (lv_btn_width, lv_btn_height);
    setExtent (lv_btn_width, lv_btn_height);
    }
    };

    Here's how I'm trying to get the selected item

    lv_str = (String) lv_locChoice.getChoice (lv_locChoice.getSelectedIndex ());

    I know that it should be a simple way to do it, here is what I finally realized. It returns the index value to the lv_choice_sel variable, which is a variable so now I can use it throughout the app.

    --------------------------

    String [] lv_locs = {lv_loc0, lv_loc1, lv_loc2, lv_loc3, lv_loc4, lv_loc5};
    int lv_start_psn = 0;
    lv_locChoice = new ObjectChoiceField ("", lv_locs, lv_start_psn)
    ObjectChoiceField.FIELD_HCENTER | ObjectChoiceField.USE_ALL_WIDTH)
    {
    protected void fieldChangeNotify (int context)
    {
    lv_choice_sel = Integer.toString (getSelectedIndex ());
    If (lv_choice_sel is nothing)
    {lv_choice_sel = '0' ;}
    }
    };

  • ObjectChoiceFIeld - RuntimeStore error

    When I run my program in the Simulator, I get a "ClassCastException.  I can't understand why...

    Here is the code:

            Integer choiceOne = new Integer(0);
            if(d != null && d instanceof Hashtable) {
                Data = (Hashtable) d;
                choiceOne = (Integer)Data.get("timeposition");
            }
            int ChoiceOne = 1;
            if(choiceOne != null) {
                ChoiceOne = choiceOne.intValue();
            }
    
            /* General Display Options */
            LabelField spacer = tmtth.labelGenOne(" ");
    
            /* Time Display Options */
            String topOrBottom[] = {"Top", "Bottom"};
            positionChoice = tmtth.choiceGenTwo("Time Position Display", topOrBottom, ChoiceOne);
    

    The error occurs after that I start my Save menuitem that is the following code:

                Hashtable hs = new Hashtable();
                RuntimeStore rs = RuntimeStore.getRuntimeStore();
                TellMeTheTimeHelper tmtth = new TellMeTheTimeHelper();
                hs.put("timeposition", positionChoice);
                rs.remove(HomeScreen.MY_DATA_ID_OPTIONS);
                rs.put(HomeScreen.MY_DATA_ID_OPTIONS, hs);
                tmtth.onClose();
    

    Cast you to integer first in the code block when you pull, it forms the hash table.

    choiceOne = (Integer)Data.get("timeposition");
    
  • Listener for ObjectChoiceField

    I am trying to add a listener for an ObjectChoiceField in the same way I did for a ButtonField in this code. But I get an error in this line ObjectChoiceField choiceSelected = field (ObjectChoiceField);

    For now I check to headset ObjecChoiceField with a dialog.alert. If it works then I intend to add a BitmapField to the screen that would alter the images with different selections in the drop-down list (ObjectChoiceField).

    Any help would be appreciated!

    SerializableAttribute public class TestListeners extends UiApplication {}

    Public Shared Sub main (String [] args) {}

    PAP TestListeners = new TestListeners();

    theApp.enterEventDispatcher ();

    }

    public TestListeners() {}

    pushScreen (new TestListenersScreen());

    }

    final TestListenersScreen class extends form {}

    public TestListenersScreen() {}

    HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager();

    Add (_fieldManagerBottom);

    ButtonField canadaButton = new ButtonField ("Canada");

    ButtonField ukButton = new ButtonField ("UK");

    ButtonField usButton = new ButtonField ("USA");

    FieldChangeListener buttonListener = new FieldChangeListener() {}

    ' Public Sub fieldChanged (field field, int context) {}

    ButtonField buttonPressed = field (ButtonField);

    Status.Show (buttonPressed.getLabel () + "button has been pressed");

    }};

    canadaButton.setChangeListener (buttonListener);

    ukButton.setChangeListener (buttonListener);

    usButton.setChangeListener (buttonListener);

    _fieldManagerBottom.Add (canadaButton);

    _fieldManagerBottom.Add (ukButton);

    _fieldManagerBottom.Add (usButton);

    String [] choiceArray = {'image1', 'image2', 'image3'};

    ObjectChoiceField choice = new ObjectChoiceField ("Drop-down list for choosing" choiceArray, 1);

    ChoiceListener myChoiceListener = new ChoiceListener();

    choice.setChangeListener (myChoiceListener);

    Add (Choice);

    }

    }

    }

    / public class ChoiceListener implements FieldChangeListener {}

    ' Public Sub fieldChanged (field field, int context) {}

    ObjectChoiceField choiceSelected = (ObjectChoiceField) field.<-->

    Dialog.Alert ("choice" + choiceSelected.getSelectedIndex () + "has been pressed");

    }

    };

    What is the error you get?

    I have field listeners that listen on the buttons and the ObjectChoiceFields.  I use code like:

    ' Public Sub fieldChanged (field field, int context) {}

    If (field instanceof ObjectChoiceField) {}

    ObjectChoiceField test = field (ObjectChoiceField);

    Dialog.Alert ("choice" + test.getSelectedIndex () + "has been pressed");

    }

    }

  • Fixed HorizontalFieldManager Albums

    Hello

    I'm doing a top fixed banner (HorizontalFieldManager), style facebook/twitter, but I have no idea how do:

    I have tired:

    fmt=new HorizontalFieldManager(Manager.USE_ALL_WIDTH | Manager.NO_VERTICAL_SCROLL );
    

    But it did not work, the Manager moves upward when I scroll down.

    Hope you guys can help me.

    In addition, how can I Center all the buttons inside the HorizontalFieldManager?

    Welcome to the forum.

    What you ask is not trivial and will require a bit of reading as well as essays and substantive errors.

    Start by reading from this base.

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

    Once you have been through this, so try a few options and ask questions.

    I'm not aware of a KB article or thread on this forum that corresponds exactly to your needs, but there are lots of similar questions, so search the Forum to find answers too.

    Good luck.

  • Error "Index out of range" on search query

    I have a configuration of search query to clear my listview and insert new results of the query in the listview. The code looks like this:

    {OnDataLoaded}

    _APP. Clearlist

    root. ListView.insertlist (Data)

    }

    {OnQueryChanged}

    Load();

    }

    But unfortunately, whenever I do a query, and as a result appears my query update (triggered from a contextual menu) does not work and gives me the error "Index out of range". Even if the results of the query to fill listview very well and when I tap on a result it shows all data fine as well.

    And FYI the update query does not work when the list is not be searched or filtered so I don't think that there is a problem with my function.

    What I am doing wrong?

    He solved.  The problem is that the update function trying to remove and add the updated item within the filtered datamodel causing problems.  I just got the datamodel to load before performing the functions as described below:

    bool App::updateObject(const QString &id, const QString &name, const QString &description, const QString &datefield, const QString &lat, const QString &lon, const QString &categoryfield, const QString &mapurl, const QString &itempic)
    {
        bool updated = false;
        bool saved = false;
    
    //    if (!validateID(id))
    //        return false;
    
        Location *location = new Location(id, name, description, datefield, lat, lon, categoryfield, mapurl, itempic);
    
        // Find location in the datamodel.
        // Only the id is used by find(). This is because location
        // defines equality (==) as having the same id. (See the definition of "=="
        // in the location class.)
        const QVariantList updateIndexPath = m_dataModel->find(location);
    
        // update the item if found
        if (updateIndexPath.isEmpty()) {
            alert(tr("Object ID not found."));
            updated = false;
        } else {
            load();
            updated = m_dataModel->updateItem(updateIndexPath, location);
        }
    
        // Save the datamodel if we updated something.
        if (updated) {
            m_storage->deleteFromDB(id);
            saved = m_storage->save(m_lastCustomerID, m_dataModel);
            load();
            refreshGroup();
    
        }
    
        return (updated && saved);
    }
    
  • Open objectChoiceField press ENTER, curve 8520 (JDE 5.0)

    Hello

    I added an objectChoiceField on horizontalfieldManager (hfm) and hfm is added to the main vericalfieldmanager.

    I click the trackpad, opens my objectChoiceField and I am able to make the selection,

    but when I press on enter (when ojectchoicefield is focused), the focus moves to the next field. I want to open choicefield when I press on enter the update choicefield.

    Thanks in advance.

    Thank you and best regards,

    Fekri

    I created this example... try what he's working on the press to enter the key

    SerializableAttribute public class HelloWorldScreen extends form {}

    ObjectChoiceField objectChoiceField;

    public HelloWorldScreen()
    {
    setTitle ("Screen Test");

    objectChoiceField = new ObjectChoiceField ("Test", new String [] {"1", "2", "3"});
    Add (objectChoiceField);

    }

    {} protected Boolean keyChar (char c, int status, int time)

    If (getFieldWithFocus () == objectChoiceField & c == Characters.ENTER) {}
    EventInjector.invokeEvent (new EventInjector.NavigationEvent (EventInjector.NavigationEvent.NAVIGATION_UNCLICK, 0, 0, status))

    ));
    }
    Returns true;
    }

    }

Maybe you are looking for

  • Remove all of the default search engine but google for all users?

    I work for a school district that uses web filtering out both in network. We were running through a situation where our students are able to move from Google to Yahoo search engines to see inappropriate material. We have worked with our provider of w

  • How to reset the password of bios mini hp?

    I bought a HP Mini 110-1212NR for my daughter a few years ago. She put it away after using it for a while because her boyfriend had a MAC and is now accompanied by wanting me a password before starting the system. Of course she has no idea, but it gi

  • MacBook wakes up every 2 hours

    Hello I have a new MacBook Pro retina 15 ". If I put it to sleep (ALT + CMD + POWER) he wakes up aprox. every 2 hours (monitor turns on, disc external hard starts). How can I disable it? Thank you

  • BSOD - DRIVER_IRQL_NOT_LESS_OR_EQUAL with nvlddmkm.sys and ntoskrnl.exe

    Hey there, My computer has started planting since yesterday. I played a game for a while and it might or might not be related; Eitherway, it suddenly froze the system unexpectedly and I had to reset my pc. After that system started correctly. I ran t

  • failure to print photos

    I have always used "Microsoft Picture It" to print my photos, however all of a sudden my printer (HPPhotosmart 7510) tells me I have the wrong size inside paper any size I have loaded in the printer. Does anyone know how to fix this? Thank you Cynthi