Hi there
I need some help in making this work. This is my code
This is the output, that is not what I need. I have changed the font size also, nothing happens. What am I missing?
Also within the items, I need to add an image from file.dirassets, this works well in b4a.
I have tried this code, I found and modified.. (dont know how to figure it out also)
1. The text on the hexagon should be white.
2. Each item should have an image, with
Any help will be appreciated!
Thanks,
I need some help in making this work. This is my code
B4X:
'clear the hexagon
HexMenu1.Items.Initialize
For i = 1 To 10
Dim eachD As CSBuilder
eachD.Initialize.Alignment("ALIGN_CENTER").Color(Colors.White).Font(Font.CreateNew(8))
eachD.Append($"Item ${i}"$).PopAll
HexMenu1.Items.Add(eachD)
Next
HexMenu1.Update
This is the output, that is not what I need. I have changed the font size also, nothing happens. What am I missing?
Also within the items, I need to add an image from file.dirassets, this works well in b4a.
I have tried this code, I found and modified.. (dont know how to figure it out also)
B4X:
Sub AppendImage(cs As CSBuilder, bmp As Bitmap)
Dim attachment As NativeObject
attachment = attachment.Initialize("NSTextAttachment").RunMethod("new", Null)
attachment.SetField("image", bmp)
Dim attributedString As NativeObject
attributedString = attributedString.Initialize("NSAttributedString") _
.RunMethod("attributedStringWithAttachment:", Array(attachment))
Dim no As NativeObject = cs
no.RunMethod("appendAttributedString:", Array(attributedString))
End Sub
1. The text on the hexagon should be white.
2. Each item should have an image, with
B4X:
'Dim bmp As Bitmap = LoadBitmapResize(File.DirAssets, "sos.png", 70dip, 65dip, False)
'AppendImage(eachD, bmp)
Any help will be appreciated!
Thanks,