question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to dynamically change text value of menuButton

See original GitHub issue

Hey,

https://codepen.io/abhijeet100/pen/mdPezJq?editors=1011

image For the expected behaviour when selecting a value from the menuButton “Line-Height” should get replaced by the value selected.

You can check out the code using the given link.

I am using an object to store the value to display as text and tooltip, but before that I also tried something like:

editor.ui.registry.getAll().buttons.lineheighhtbutton.text = config[key].value

but this also didn’t work for me. Please suggest some workaround if possible or if anything in the code seems wrong.

Thanks, Abhijeet

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
PeiyuanZcommented, Nov 4, 2020

same need one api to change text

5reactions
jRexhmaticommented, May 10, 2021

@lnewson Is there any update on this one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamically Add Values To Tkinter Menubutton (using list)
This can be done by using a list and a dictionary as follows: menubutton = Menubutton(root, text = "Select") menubutton.menu = Menu(menubutton) ...
Read more >
MenuButton text as dynamic
Hi,. I want to add a MenuButton and set its' text as dynamic with Expression binding. What I wrote is like this: {=${WA_ROOM-ROOM_DESC}?...
Read more >
how to change button text in asp.net Dynamically - CodeProject
Imran..U can try this..Use The session value..i.e.,wen user clicks on respective button..just add the session value..to ...
Read more >
How to change Button Text Dynamically in Tkinter?
In this example, we will change the Button Text, based on the existing text value of button. Python Program from tkinter import *...
Read more >
Add menu items dynamically to menu buttons in TinyMCE
This means that, if we can change the value of items after initialization, the menu items will change also. For example, we could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found