KDE Plasmoid how to override Text displayed when hovered over the plasmoid - qml

If I hover over my plasmoid, it displays the string specified as comment in the metadata.desktop. But if I for example hover over the battery-icon, it displays the percentage.
Is there any function to override this behavior and display an other comment in QML?

Related

Balloon tooltip not display in systemtray

I set my NotifyIcon of the boot form as follows:
![
]1
thinking about getting something like:
But it doesn't show me anything when I hover over the icona in the systemtray. How come? what am I wrong
The balloon is only shown when you call NotifyIcon.ShowBalloonTip(timeout), not when you hover on the system tray icon, and it uses BalloonTipText and BalloonTipTile properties. You have to handle this method in some event or function.
For example, you could do this when you minimize the form:
NotifyIcon.Visible = True
NotifyIcon.ShowBalloonTip(2000, "MyApp", "The program is still running!", ToolTipIcon.Info)
When you hover on the icon and the icon is visible, instead, only a tooltip appears. The tooltip displays the string set in the Text property and doesn't use BalloonTipText and BalloonTipTile.
So you don't have to handle the hover, the ToolTip should automatically appear.
If the issue persists, try to set Visible = False in the designer in order to see whether setting Visible = True works and make sure that there isn't any instruction that throws exception before the ShowBalloonTip method.

VB NET What is the good way to find a position of an object inside a scrollable panel?

I have an object inside a scrollable panel, and I want to get the position of the object. Everything is okay until I have create many object inside the panel until the panel needed to be scrolled. Then I notice that the X Position of the object changed after scrolling the panel. Take a look at example image below
X Position inside a scrollable panel
I'm using Position.X to get a X Position of the object, but as you can see in the picture above. It does me no good.
Is there a way to get the actual position even if the panel is scrolled ?
UPDATE:
I have One Panel that have Auto Scroll as True , and on Button inside a Panel, let's just say the button name is Button1 and the Panel is Panel1
The Code i use to get the location of the Button1 is :
Dim msg = Button1.Location.X
msgbox(msg)
You're getting the screen position of the object, I don't know how because you didn't post your code. What you need to do is add the scroll offset, eg.
Position.X + scrollableControl.AutoScrollPosition.X

Dojo Horizontal Slider - A tooltip to hover over the slider handle with current slider value?

I have just started with Dojo widgets. Recently, I did this Dijit Horizontal Slider Sample,and I have been wondering how to make a tooltip follow the slider handle with the current slider value as the tooltip content.
I have tried the same but am facing two issues:
One, the tooltip appears at the end of the slider rather than constantly hovering on the slider handle.
Two, the tooltip displays a value only when I stop sliding rather than changing seamlessly.
How to overcome these?
If you want the tooltip to move with the slider, you have to find a way to open it from the slider handle, not from the entire horizontal slider widget. I do not know if the actual slider you move with the mouse is it's own widget or not. From the declarative sample online the HTML for the handle looks like this
<div data-dojo-attach-point="sliderHandle,focusNode" class="dijitSliderImageHandle dijitSliderImageHandleH" data-dojo-attach-event="press:_onHandleClick" role="slider" aria-valuemin="-10" aria-valuemax="10" tabindex="0" aria-valuenow="4" style="position: absolute;"></div>
So you can try something like the following, if you can get a reference to the sliderHandle object.
/*
* Create the tooltip dialog that you want to show (I use tooltip dialog,
* but you can do the same with basic tooltip)
*/
var myTooltipDialogbase = new ttdialog({
id: 'myTooltipDialogBase',
style: "width: 275px;"
});
Then in your event handler (in this example right mouse click) you open the popup
/**
* On right mouse click, opens the tooltip dialog
*/
on(sliderHandle, 'contextmenu', function (event) {
popup.open({
parent: sliderHandle,
popup: myTooltipDialogbase,
around: sliderHandle.domNode
});
});
EDIT:
For your second question, you can use the slider property onChange() to do something each time the value of the slider changes. You must set intermediateChanges=true so onChange is called when sliding. In your case, in onChange(), if you can get a reference to the tooltip, then change the value of one of the tooltip objects for every value change of the slider.

Getting the name of a button while the progress bar is going on in webdriver

I have one button named "Add" in my web portal. On clicking on that button a progress bar appears and the name of the button gets changed to "Adding" from "Add" and remains "Adding" until the progress bar is not moved to 100%. After the progress bar is 100% complete, again the text of Add button changes back to "Add" from "Adding".
I need to assert whether the name of the button is changing from "Add" to "Adding" or not during the progress bar movement. But the problem is once I click on the "Add" button, then use the assertion, selenium will first click on "Add" button, completes the progress bar to 100% and then tries to assertion, but now already the text of "Add" button is already changed back to "Add" from "Adding".
Please give the solution. Thanks in advance.
You can find the element, click and immediately return it's text which can be used later for Assert
public string Test()
{
IWebElement element = Driver.FindElement(By.CssSelector("Something"));
element.Click();
return element.Text;
}
Assert.IsTrue(Test().Contains("Adding"));
Note: C# code

flex edit menu operations on multiple textareas

I have a grid in which one column is having itemrenderer as textarea. My application is menu controled. Now I want to perform edit operations on the textarea using menu items.
Like if I select some text from a textarea in the grid, then I select a menu item "Cut" then it should cut the selected text from the textarea. In this manner I would lie to perform all operations.
I am not getting how to get that the operation is to be performed on which textarea?
inside your menu item click handler, try:
var fcs:IFocusManagerComponent = focusManager.getFocus();
if(fcs is TextArea)
{
var txt:String = TextArea(fcs).text;
System.setClipboard(txt);
}