Zina, I asked this question on several boards, too, before our first cruise last month. We have three pre-teen boys and I was hoping that their dressy madras shorts outfits that they normally wear to church in warm weather would do. I was told in no uncertain terms, "ABSOLUTELY NOT". So I just took dockers for them, and that worked fine. I did, however, see younger boys in the dining room in shorts, but no adults. The maitre'd, during his nightly announcements, would always make a reference to "no shorts".
Based on our limited experience, you might be able to "get away" with it, but it depends on if you're comfortable with that. I didn't want to "buck tradition", but I saw it done. There was a time when boys didn't even own long pants until they were of a certain age, so I don't personally think it's a huge big deal, but others feel differently.
If you go the dockers route, you could just pack two pairs of dockers and several different shirts (any shirt with a collar will do, whether it's a polo or button down) and alternate the pants. We always had our boys change directly after dinner so they wouldn't dirty up their slacks.
Good luck and happy sailing,
JO