easy Slider 1.7 (Pause hover) - jquery-hover

I have a problem , i am using easy Slider 1.7 and i have a problem on Pause Hover the element .
THe pause hover works , but not as i want it to .
As you can see in this example at the top of the page http://www.graphicvision.ro/projects/forex/index.php , the slider pause on mouse hover , for example hover the image or the text , but if i move it from the element (say text) to the image element. it plays the next slide even i am in the slider . i want it when hover any element in the slider to stay paused .

The following piece of code worked perfectly fine for me as I just didnt want to pause the regular way, I wanted to pause the slider and keep the mouse moving within the element without being driven to the next slide. If you need assistance, please feel free to ask.
if (options.hoverpause && options.auto){
$('#slider').hover(function(){
clearTimeout(timeout);
},function(){
animate("next",false);
});
};

Related

How to disable the progression animation of a QProgressBar

I have a QProgressBar showing the progress of an ongoing algorithm. It works just fine in a normal utilization.
But I also have a STOP button allowing user to stop the algo, for example at 42%. At this point, I set the value of the QProgressBar at 42.
The problem is, the progress bar has an animation (like a white ray moving from left to right) showing progress.
I would like to keep this animation when the algorithm is still running, but stop it when user press the Stop button.
I could set the value to 0 or max when the button stop is pressed, but we still want to keep the value when user pressed stop (42% in my example).
It is similar to this question which was not really answered : disable progress bar animation in Qt

Set horizontal scroll of CListBox row back after resetting content

I got a multiple selection CListBox with horizontal scroll bar enabled and showed correctly. Problem is, that when I use function
lst.ResetContent() and fill it back, I can't find way to scroll text in the rows back to the same position. I tried to use
lst.SetScrollPos(SB_HORZ, horizScroll, TRUE); , where horizScroll = lst.GetScrollPos(SB_HORZ); This works correctly on scroll bar itself, but
text in the row stays not scrolled (manual scrolling functions OK).
Structure of my program is:
CListBox lst;
int horizScroll;
/*Periodically doing code bellow*/
//Get current scroll position
horizScroll = lst.GetScrollPos(SB_HORZ);
//Reset current content
lst.ResetContent();
//Add item into CListBox (UNICODE in my application)
lst.AddString(L"Some longer text then width of CListBox");
//Calculate horizontal extent and set it through
lst.SetHorizontalExtent(calculatedWidth);
//Try to scroll text (scrolls only scroll bar, not text itself)
lst.SetScrollPos(SB_HORZ, horizScroll, TRUE);
UpdateData(FALSE);
Thanks in advance!
EDIT:
As "rrirower" answered correctly,
lst.PostMessage(WM_HSCROLL, MAKEWPARAM(SB_THUMBPOSITION, 250), 0);
message does the job. Scroll position from horizScroll works perfectly. I suggest posting this message twice, because if you do it only once, text is re-scrolled visually from beginning to the wanted position. When you post it twice, text visually stays at the correct position and scroll bar just quickly comes to the right place.
If I understand you correctly, you're trying to scroll the text in the list box horizontally using the program code. If you use Spy++, you'll see that when you manually scroll, using the mouse, a series of WM_HSCROLL messages is posted to the list box control. You can accomplish the same thing by doing this...
lst.PostMessage(WM_HSCROLL, MAKEWPARAM(SB_THUMBPOSITION, 250), 0);
You need to calculate the position (I used 250 above), but, the above code should move the text and the scroll bar horizontally.
After some reading it seems that Invalidate should do the trick. Since as I understand you have one text line this should be fine, however if the painting itself is complex and requires resources you can use ScrollWindowEx and then InvalidateRect on the rectangle returned by the latter to repaint only the changed area.

Mouse programming

https://stackoverflow.com/questions/9466359/graphics-editor-in-c
I've developed a simple graphics editor in c++.It requires me to drag the mouse to draw a shape .After drawing the shape I want to fill it by picking a color but since dragging the mouse amounts to a large number of clicks because of which the entire screen gets filled with a default color even before i've drawn the shape. delay() doesn't work either.
the mouse click event in turbo c++ has two part. one where you press the button and two when you release the button. you need to drag so you should use the clrscr() function in the loop which goes on iterating until the mouse button is pressed down along with the code for the shape you want to draw. that way your screen keeps getting updated when you are dragging the mouse. and the loop ends when you release the button.
for filling the shape using the flood fill function should suffice
Perhaps one of the following links is what you're looking for:
http://www.codeproject.com/Articles/11313/Mouse-Programming-in-C-C
http://www.cprogrammingreference.com/Tutorials/Advance_Tutorials/mouseprogramming.php
http://www.brackeen.com/vga/mouse.html

Irrlicht Gui mouse will not click buttons

I'm making my first game in Irrlicht (C++), an RTS with mouse control
and when you select a tile (by clicking on it) it lights up and some gui button appear on the screen (not in a gui window mind you, I like it this way):
http://i1139.photobucket.com/albums/n549/Adam_Halley-Prinable/Untitled2.png
However, since i switched to mouse control, the buttons wont register my mouse clicks. The click goes straight through the button and selects the tile behind instead:
http://i1139.photobucket.com/albums/n549/Adam_Halley-Prinable/Untitled3.png
Is there a way I can say "Buttons get top priority for clicks"?
I'm using MyEventReceiver, which i've messed around with to accept mouse clicks and that.
Thanks a bunch :D
If anyone else has the same problem, ill tell you how I solved it :)
Go through the MyEventReceiver.h and get rid of all the "return true;"'s in the mouse section.
Don't ask me why, but it works, and appears to have no side effects. Make sure you leave the "return false;" at the end of the section there.
Your event receiver fires before the GUI gets access to the event, if you want to pass it to the GUI then you can do this by manually posting it to the GUIEnvironment in your event receiver.
if (guienv->postEventFromUser(event))
return true; // abort because the gui wanted it
// .. pick nodes
// possibly post event to scene manager
return true; // remember to return true so gui/smgr don't get the event again

Context menu using C++/Qt

I have written C++ code for video display and want to set contextmenu on the video screen as in vlc player occurs. But What happens when I right click on the border of the screen the popup window appears not on the central widget. What is desired that if its clicked anywhere
the popup should be displayed, but it's not happening.
Please help me..
Thanx in advance
It looks like you have a video player embedded into a widget (main frame, most probably) and that you bound the right click to the main widget.
If you video player has already a behaviour defined for right click, the event wont be transfer to the parent (the main widget) and thus, the behaviour you describe will appear. Without code or more details, it's hard to give a better feedback, but I'd start looking in that direction.