Looking through a few questions and answers i still am unable to find out what is wrong...
local myTextObject = display.newText( "Hello World!", 160, 240, "Arial", 60 )
This line of code - directly from the Corona Docs Guide is not displaying any text within my simulator. trying to figure out the problem i created a blank project and copy pasted this code and still nothing happens despite it being the only thing within the file.
Checking through iv used differnt fonts, used differnt methods of handling the string and still nothing will appear within the Corona Simulator - Even updating the SDK still doesnt solve this issue.
What am i doing wrong :S
thanks
local myText = display.newText( "Hello World!", 100, 200, native.systemFont, 16 )
myText:setFillColor( 1, 0, 0 )
Paste this code in the main.lua. Try this out it must work for sure.
Have you tried changing the font color?
text:setFillColor (200/255,0/255,2/255)
You said that you create a blank project so, Im expecting it as a black background, and creating text without changing the font color will make it look that it doesn't show any text
Related
I am working on a Kivy(Python) Project and I need to display approval(✓) and cross(X) symbol in different scenario. I can display cross symbol but unable to display other one. Is there any way to do this ? Thanks.
Note: I have tried, writing text:'✓' and text:u'2713' under Label in .kv file but it doesn't work.
The font supplied with Kivy doesn't include the tick mark. You need to use fonts that include those symbols. Tick is available in fonts Arial Unicode MS, Wingdings and Wingdings 2. You can download the font ttf file and have it in the same folder with your script.
Link to download the font
https://www.download-free-fonts.com/details/88978/arial-unicode-ms
Then include the font and use it in the label as follow:
Label:
font_name:'arial-unicode-ms.ttf'
text: "This is the tick ✓"
Bro I was also troubling from same problem from morning but now I figured it out actually so I would like to share it with you.I used below code:
def wrong_btn(self):
self.ids.wrong_button.text = u"⌫" self.ids.wrong_button.font_name=r"C:\Users\95532\AppData\Local\Microsoft\Windows\Fonts\Arial-Unicode-MS.ttf"
I used this to specify the folder in which the font is stored so you can also download the font you want and just specify the path and don't forget use a r i.e raw string mark or else it wont work I wasted my whole day searching for that hope this helps you bro
I have newly set up Linux Mint in my computer and learning wxpython(just because I was bored of tkinter and needed some rest from the headaches i got from creating large applications on it). I learned about first command 'TextCtrl'. Every thing works except I have a bit problem. the code is simple.
panel = wx.Panel(self)
wx.TextCtrl(panel, position=(10, 10), size=(250,150)
the code works fine except when I run it the cursor and the text appears to be in the middle(like vertically middle). Searched the damn internet, never found a simple solution. any guesses how can i align in to top in a single line of code?
screenshot
I think wx.Python will automatically align the text to the center in the vertical direction. If you need a wx.TextCtrl that big, I guess you want a multiline wx.TextCtrl. This you can get with the style parameter:
wx.TextCtrl(panel, position=(10, 10), size=(250,150), style=wx.TE_MULTILINE)
I started to write my own watch face. I have problem with font spacing. I'm using custom .ttf font and my problem is that "1" and "9" digit does not have same width. When hour/minute changes from 1 to something different, whole text move. I don't know what to do with it.
I have 3 ideas to handle this problem :
- use png images of digits instead of font (more space needed, harder)
- take every digit as a single TextLayer (to display "00:00" I would need 4 TextLayers)
- some function build-in already - tried to find but without luck
I'm writing it in C.
Thanks,
Peter.
I downloaded some other watch faces and tried to play with them. Problem was with font, not my app. I used "FontForge" to modify width of "1" in font I want to use. Now everything is working fine without splitting etc..
first time user of Stackoverflow;
Problem: even at the basic level of trying to print out simply Hello world nothing seems to happen.
using this:
local text = display.newText("helloworld", 50, 50, native.systemFont, 24)
print(text)
the varible "text" when printed holds the value of "Table: 010F3E50" which changes on each reload
im new to this language and this is really annoying - Any help would be fantastic
Cheers
Actually, you are trying to print the object. Not the text inside. So try:
print(text.text)
Instead of:
print(text)
Keep coding............ :)
The color of the text might be black by default which might be the same color as the background in the simulator. Meaning it's visible but you just can't see it!
Trying changing the color of the text object by doing this:
text:setFillColor(1,0,0) -- red text
When I apply color on TeeChart other than a named or known color it is shown as transparent. This applies to axis, series, labels, and gridlines.
CyChartControl.Header.Font.Color = Color.FromArgb(((System.Byte)(A)),((System.Byte)(R)),((System.Byte) (G)), ((System.Byte)(B)));
Does anyone know why this happens?
This works fine for me here:
tChart1.Header.Font.Color = Color.FromArgb(200, 200, 50, 150);
What TeeChart .NET version are you using?
It would be helpful if you could send us a simple example project we can run as-is to reproduce the problem here.
You can send your files to "info at steema dot com"