|
-
Apr 12th, 2006, 12:39 AM
#1
Thread Starter
Arabic Poster
J2ME CustomItem
Hi all,
I'm working on a MIDP 2.0 CustomItem, this item holds a Vector of Images to display...
I was wondering "How can I make the Item fit to the Form?" or Fit to what is left of the form after adding other items (Width and Height)
Thanks..
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Apr 12th, 2006, 05:35 AM
#2
Frenzied Member
Re: J2ME CustomItem
Not sure. I couldn't find any detailed API documents on the subject. Only thing I found was a method called append. I guess you could try and see if you can use setBounds(int, int) with it, but I doubt you can. The only other alternative I can think of, is just make the images the desired width and height beforehand. I'm sure there's a real way of doing this, but I can't find the documentation on the custom controls.
-
Apr 12th, 2006, 12:16 PM
#3
Thread Starter
Arabic Poster
Re: J2ME CustomItem
You didn't get me right!
I'm designing the Item, I don't have a reference to the Form..
What I wanna make is a CustomItem that Docks automatically
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Apr 13th, 2006, 05:18 AM
#4
Frenzied Member
Re: J2ME CustomItem
Sorry.
I don't see how you can get it to dock automatically, though. What you want seems like behavior that is left up to the form, not the control.
-
Apr 13th, 2006, 02:23 PM
#5
Thread Starter
Arabic Poster
Re: J2ME CustomItem
I know that
but when you create a TextField, it automatically takes the width of the form... I want my Item to do the same plus take the height of the Form....
I thought it's possible to do this without needing a reference to the containing Form
Thanks for your help anyway
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Apr 14th, 2006, 07:53 AM
#6
Frenzied Member
Re: J2ME CustomItem
I thought it's possible to do this without needing a reference to the containing Form
See, I don't know anything about the J2ME frame, so I could be wrong about this... Wouldn't the size and positioning of the control depend on the coder of the frame? For instance, you want this control to take the w and h of the form, but isn't that decided by a layout manager or method set in the frame?
I guess you could try taking a reference to the frame as an argument or possibly calling a few super() methods that will alter something, but I just don't see it happening. Again, I don't know much about J2ME so I'm pretty much talking in the wind.
Thanks for your help anyway
No prob buddy, just returning favors.
-
Apr 14th, 2006, 08:05 AM
#7
Thread Starter
Arabic Poster
Re: J2ME CustomItem
Some Items have a layout manager but Custom Items don't. I guess I'd have to do more research on it
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|