We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-12-05 11:20 PM - last edited on 2024-09-24 10:27 AM by Doreena Deng
Hi All,
This has probably been asked before, however, I am trying to create some picture buttons in a custom UI for Bold, Italics and Underscore text style settings and can't quite work out how to set the pictures for each individual button using ui_infield{3}? I am trying to use the 18x18 text style pictures in the default Archicad library. I have attached the actual UI as it currently stands with no pictures appearing on the buttons and the proposed UI with how I want the buttons to appear. Hope this helps!
ui_infield{3} may not be the right approach, happy for someone to tell me otherwise.
Regards,
Jarrod
Solved! Go to Solution.
2023-12-06 06:40 PM
Don't do that by hand anymore.
Use UI_TEXTSTYLE_INFIELD instead.
This is a built-in function since AC 22 and it renders everything nicely (the buttons are even localized! So while you might get "B" for "bold" I as a german will get "F" for "fett").
2023-12-06 08:29 AM
2023-12-06 08:56 AM - last edited on 2023-12-10 06:42 AM by Laszlo Nagy
ui_infield{3} "fontEffects", rightHalf + 70, 48, 54, 18,
6, "", 0, 0,
0, 0, 0, 0,
0, "ui_bold_hl(1)", "Bold",
0, "ui_italic_hl(1)", "Italics",
0, "ui_underline_hl(1)", "Underscore"
2023-12-06 06:40 PM
Don't do that by hand anymore.
Use UI_TEXTSTYLE_INFIELD instead.
This is a built-in function since AC 22 and it renders everything nicely (the buttons are even localized! So while you might get "B" for "bold" I as a german will get "F" for "fett").
2023-12-06 11:14 PM - last edited on 2023-12-10 06:43 AM by Laszlo Nagy
Hi runxel, Thanks for your comment, however, I am after a push button in this instance.
Cheers!
Jarrod
2023-12-07 10:28 AM
Apologies @runxel, I was swamped with work and completely mis-read your message. I thought you were suggesting that I use ui_listitem haha. Sorry, what you have suggested is exactly what I wanted. Thanks! I am however having an issue with the Underline option not working correctly. Do you mind taking a look at my code? (pasted below).
Parameter script:
values "fontEffects", 0, 1, 2, 3
Interface Script:
ui_textstyle_infield{2} 'fontEffects', 1+2+4+0+0+0, rightHalf + 70, 48,
18, 18
Cheers,
Jarrod
2023-12-07 11:46 AM
@Jarrod Phillips wrote:
I was swamped with work
Aren't we all? 😅 No worries Jarod.
There is no need to have a values command for that in the param script imho.
What could be set as values is already defined in the UI script.
But if you would do it: you'd need the right values!
There is misconception here. The buttons are not exclusive, but additive! So you could say a text is bold, italic, and underlined at the same time!
Which would result in a value of '1+2+4' = 7. And that one is not in your "values" list. Heck, not even number '4' is in there! (That's why it CAN'T work right now.)
Better to leave out the "values" command alltogether.