Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

EditItem method trap for young players

Just a tip for this one in case it prevents someone else from spending time scratching their head like I did.

If you are planning on using the EditItem method for any tree items, you may need to set the height for those items to slightly larger than the default or more accurately larger than it needs to be to simply read the text.
Otherwise when you enter edit mode you can't see either the text or the cursor so you don't know what you're typing until you've moved on and left edit mode. Then you can see what you're left with.

I suspect how much bigger may be subject to font size or default item size but you could probably get away with an increment of just one but you can experiment to see what suits your requirement.

Main point is, if you set an item to editmode and you get just the rectangle and no text or cursor go back and increase the height for that item.

Comments

  • Word to the wise!
  • Well I was searching my code to figure out what I had done, thinking I had done something silly with the colours like made it white on white. Couldn't figure it out and was more baffled because it was working nicely in one screen and not another.
    Caught on when I realised I had increased the height for the working one in order to cater for multiple lines.

    Simple when you know how... Maybe this might save someone else that bewilderment. :)
Sign In or Register to comment.