Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ahmadahmad
Posts: 404
Registered: ‎05-31-2011
My Device: curve
Accepted Solution

stylesheet css

hi, i want to know if i can use a style sheet and apply it to Fields in a blackberry application?  if yes how to do it? 

thanks in advance

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: stylesheet css

no.
you can use webworks to develop using html5+css.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ahmadahmad
Posts: 404
Registered: ‎05-31-2011
My Device: curve

Re: stylesheet css

Hi Simon, I use eclipse, I add the code below in my application and i start my app, I didnt set the style for any Field, i think if i can't use a stylesheet it must catch an exception while running! isn't true?

setTitle("MyTitle");
        StyleSheet test = new StyleSheet() {
			
			public void setDisabled(boolean disabled) {
				// TODO Auto-generated method stub
				
			}
			
			public String getType() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public String getTitle() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public StyleSheet getParentStyleSheet() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public Node getOwnerNode() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public MediaList getMedia() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public String getHref() {
				// TODO Auto-generated method stub
				return null;
			}
			
			public boolean getDisabled() {
				// TODO Auto-generated method stub
				return false;
			}
		};
		LabelField a = new LabelField("gsdfffds");
		
		add(a);
        

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: stylesheet css

your code just adds a labelfield on a screen, the stylesheet is not used anywhere so it does not do anything.

java ui components do not use css, they have their own styles etc.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ahmadahmad
Posts: 404
Registered: ‎05-31-2011
My Device: curve

Re: stylesheet css

Oke thanks :smileywink: