w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to add picture box control and label control dynamically in list view control
Did you google around? There are lot of links that can help you http://geekswithblogs.net/dotNETvinz/archive/2009/04/24/faq-displaying-image-from-database-to-gridview-control.aspx http://weblogs.asp.net/aghausman/archive/2009/05/26/show-images-on-grid-view-from-file-stream.aspx http://www.codeproject.com/Articles/20782/Displaying-Images-from-a-Database-in-a-GridView http://www.codeproject.com/Articles/20971/Thumbnail-Images-in-GridView-using-C

Categories : Asp Net

Why .sendKeys(Keys.chord(Keys.CONTROL, "a")) does not work in Chrome
Have you tried to use action builder? For example, from our automation suite: public void selectAndDeleteTextViaKeyboard() { selectTextViaKeyboard() deleteViaKeyboard() } public void deleteViaKeyboard() { Actions builder = new Actions(webDriverProxy.getWebDriver()); builder.sendKeys(Keys.DELETE) .release().perform(); } public void selectTextViaKeyboard() { Actions builder = new Actions(webDriverProxy.getWebDriver()); Action select= builder .keyDown(Keys.CONTROL) .sendKeys("a") .keyUp(Keys.CONTROL) .build(); select.perform(); }

Categories : Selenium

How to add an html control inside a div or crate a new control beside another control
var myA=document.createElement("a"); would create an element, you can set it's text by myA.innerHTML and src with myA.src="http://www.google.com" To add it to the page you can do: document.getElmentById("mydiv").appendChild(myA); to remove: var As=document.getElmentById("mydiv").getElementsByTagName("a"); var a = As[As.length-1]; a.parentElement.removeChild(a);

Categories : Javascript

how to set keyboard tab selection to a particular control in WPF
Just Use: <TextBox KeyboardNavigation.TabIndex="0" /> <Button x:Name="btnName" KeyboardNavigation.TabIndex="1" /> Now you should be able to jump to the Button instead of the TextBox.

Categories : C#

Is it possible to control the mouse cursor using keyboard in AS3?
No, that is not possible. The closet you can get is 'faking' events that would typically be dispatched by Mouse input, e.g. dispatchEvent( new MouseEvent(MouseEvent.CLICK) ); You can also hide the cursor and create your own DisplayObject to represent its position.

Categories : Actionscript

MATLAB GUI Button with Keyboard Control
Check out this thread: http://www.mathworks.com/matlabcentral/answers/12034 Just slightly modifying the code from there to here (put the following in a file called testGUI.m function testGUI g = figure('KeyPressFcn', @keyPress) MyButton = uicontrol('Style', 'pushbutton','Callback',@task); function task(src, e) disp('button press'); end function keyPress(src, e) switch e.Key case 'uparrow' task(MyButton, []); end end end

Categories : Matlab

appendChild not working with audio control
The audio element you originally created loses scope when the function is finished. You'll need to access the audio element that's in the DOM. audio.setAttribute("id", "myAudioClip") var div = document.getElementById(id); div.appendChild(audio); var audioElement = document.getElementById("myAudioClip"); audioElement.load(); audioElement.play();

Categories : Javascript

control audio play in background
You will have to keep a Strong reference to your view, or, at least, to your object currently playing a sound. I'll suggest using a protocol between viewControllers to let the parent view controller catch the reference before dismissing the view containing the player. You'll find much more explanation at Ray Wenderlich website's Audio playing tutorial.

Categories : Iphone

How to control volume keys?
You can use the setVolumeControlStream() method to define which Audio Stream the volume buttons should adjust while your app is in the foreground. For example, to adjust media volume: setVolumeControlStream(AudioManager.STREAM_MUSIC);

Categories : Android

WebBrowser control keyboard and focus behavior
The reason it behaves this way is related to the fact that it's an ActiveX control which itself is a fully windows class (it handles mouse and keyboard interaction). In fact much of the time you see the component used you'll find it is the main component taking up a full window because of this. It doesn't have to be done that way but it presents issues. Here's a forum discussing the exact same issue and it's causes can be clarified by reading the last commentators article links: http://social.msdn.microsoft.com/Forums/vstudio/en-US/1b50fec6-6596-4c0a-9191-32cd059f18f7/focus-issues-with-systemwindowscontrolswebbrowser To outline the issues you're having Tabbing is misbehaving. User needs to hit Tab twice to see the caret (text cursor) inside WebBrowser and be able to type. that's be

Categories : Wpf

Hi All, I need to use a keyboard option like Control Alt s in Selenium Webdriver
If you are using JAVA: String saveIt = Keys.chord(Keys.CONTROL, "s"); driver.findElement(By.whatever("anything")).sendKeys(saveIt); UPDATED Thanks to Slanec to point out that the Keys.chord can accepts more than two keys.

Categories : Selenium

Disable whole user control focusing from keyboard
If you just want to keep it from accepting focus via Tabbing just declare it on the object via IsTabStop="False" or you can edit the control Template for it and get rid of the Focus changes.

Categories : Wpf

Capture Control + Space keyboard event
found the answer myself. I have to deal with system global hotkeys, like Windows + E. It seems JNI is necessary, and I found the project jnativehook which looks really good!

Categories : Java

How do I control an HTML5 audio player with AngularJS?
I've build a html player backended by flash to play music, so build my own event flow to to the operations, but I think that the best way is to write an directive to do that. In this case you can re-use the directive if you need to and it works very well. If you have the player object into your directive, you can catch all events normally. Take a look on this website: Angular Tunes and check out the sources to see what he does. It's the same as you trying to do. I hope it helps.

Categories : Javascript

I'm trying to create a mediacontroller to control my audio file
You should be able to call start per the Android documentation once you have provided a valid audio file. MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.sound_file_1); mediaPlayer.start(); // no need to call prepare(); create() does that for you

Categories : Android

Remote Control for audio doesn't work
It looks like your view controller isn't in the responder chain. That might be due to [self resignFirstResponder] in viewWillDisappear and/or another ViewController is in the front. To make sure you receive these events you can implement a UIApplication subclass which will be able to receive the events always. So it doesn't matter which ViewController is visible. The UIApplication is always in the end of the responder chain. Create a subclass for UIApplication (MyUIApplication) and implements the following UIResponder methods: - (void)remoteControlReceivedWithEvent: (UIEvent *) receivedEvent { ... } - (BOOL)canBecomeFirstResponder { return YES; } In main.m use the following to initiate the app (replace MyUIApplication and AppDelegate with your classes names): @autoreleasepool

Categories : IOS

Control Image with Arrow Keys
@Override public void init(){ addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if(keyCode==KeyEvent.VK_RIGHT) { dx=1; x+=dx; this.repaint(); // forgot this initially } } }); }

Categories : Java

WPF MessageBox returns keyboard focus to wrong control
You could try call .MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); on sender right after MessageBox.Show. EDIT: ... MessageBox.Show("PressOk"); ((MyTextBoxCustomControl)a).MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); ...

Categories : Wpf

WPF, give keyboard focus to control that was previously collapsed
It's probably a timing issue where the control you set to visible is not ready to accept focus yet. This can happen fairly frequently when dealing with dynamic UI changes. You should still be able to focus your control but you'll need to queue the focus action until after the control has been properly initialized. Simply using a BeginInvoke call like shown below, should do the trick. Dispatcher.BeginInvoke(() => { //Set focus here });

Categories : C#

as3 keyboard game control diagonal and multiple keypresses
You should rewrite your key events processing code. When you get key event you want then just set some flag (variable). For example isUp = true. After you will get all key events for frame you can process all of these flags in single place. I.e. player pressed Up and Left you set isUp=true and isLeft=true. And further on enter frame you can move your ship up and left (diagonal movement).

Categories : Actionscript

How to simulate hardware media control buttons on an Android emulator
You can send keyevents using adb adb shell input keyevent <keycode> keycode for play - 126, pause - 85 (see KeyEvent)

Categories : Android

Control with play/stop/pause e.t.c. buttons for media playing
Something like this? As for buttons, you could search for some pretty PNGs and embed them in buttons. Easy, free, and quick to do. If you simply want to get it done, see this beast. I have not used it, but it looks like it could handle the media hassle for you.

Categories : C#

Embedded WebBrowser Control not respecting @media max-width attribute
I have a similar Problem... The only solution I can think of is a JavaScript-workaround, setting the desired CSS-attributes via JS depending on screen-width, for example screen.availWidth or such.

Categories : CSS

Control multiple html5 audio tracks using a single controller
This is jQuery based solution. To make HTML5 audio work also in IE8/7 use some additional flash fallback. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title> - jsFiddle demo</title> <script type='text/javascript' src='//code.jquery.com/jquery-1.10.1.js'></script> <style type='text/css'> .mp3Player { padding:8px; margin:8px; background-color:#ddf; } </style> <script type='text/javascript'>//<![CDATA[ jQuery(function (){ var myAudio = document.getElementById("myAudio"); var current = null; var playingString = "<span aria-hidden="true" data-icon="&#xe002;"></span><span class="screen-reader-text">Pause</span>

Categories : Javascript

Control Test Execution Progress with Keyboard Interrupts - using WebDriverEventListener & EventFiringWebDriver
I'm pretty sure what you want to achieve cannot be directly supported by Selenium. But i can share something we did for one of our projects.,we used python to simulate keyboard input for Android devices. However, you could write some wrapper code in Python which waits for keyboard input and then s executes your Selenium code. More info in this SO answer how to simulate keyboard input Which is the easiest way to simulate keyboard and mouse on Python?

Categories : Java

Can we use objects inherited from WinForms Control as keys of a .NET Hashtable?
You should only ever care for object identity when you do this. In other words, you would never want two controls to map to the same hash table slot. Never accurate to +/- 1% The default Object.GetHashCode() and Object.Equals() implementations that the Control class inherits are already perfect, they implement object reference identity. And of course you should Dictionary<Control, Something>, Hashtable was 8 years ago.

Categories : Dotnet

use function keys to locate particular control in vb.net window application
To capture the key press event, normally we handle form's KeyPress or KeyUp event. however at your case, you got 5 forms open (parent + 4 children). thus i would suggest you write the handler in the parent form, but register all children's keypress event to it, some pseudocode: Sub ShowChildren() ' Handle own Key up event AddHandler Me.KeyUp, AddressOf HandleKeyPress ' form 1 Dim frm As New frmKeyAssignBoard() frm.Location = New Point(625, 0) frm.MdiParent = Me AddHandler frm.KeyUp, AddressOf HandleKeyPress ' similar for frm2, frm3, ... ' End Sub Private Sub HandleKeyPress(sender As Object, e As KeyEventArgs) If e.KeyCode = Keys.F2 Then ' do whatever necessary when F2 is pressed

Categories : Vb.Net

How to capture volume control keys in IBM/Lenovo ThinkPad?
I think your approach is wrong. But have look at this: Disable Keyboard globally for a WPF Window As your input keys might be registered, but just not as regular input but as control keys. Maybe this is of any use as well for a more direct approach: http://naudio.codeplex.com/ NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET. I've written a small piece of code once to mute all volumes using NAudio: Mute Windows Volume using C#

Categories : C#

How to Control media player android while Playing Rtsp Link on Samsung Galaxy S3?
It is not enough of information. I think adding more code, may be even full file, would help. As per my experience, S3 is less troublesome device on playing rtsp streams, I have created rtsp player too. You might have done something wrong. Let's also ask what the stream you are trying to play, hls, anything else? You could also do the following: try to play the stream with some desktop player: quicktime, mplayer. Do they play it right? try to validate the stream with one of those rtsp streams validators, do they find it ok?

Categories : Android

Audio in html page continues to play even after I exit the web browser control windows phone 8
One method is to reload the page. I guess.. Using the following method.. var js = "window.location.reload(true);"; wbcontent.InvokeScript("eval", js); But what i really do want to know is why the audio continues to play even after i have exited the web browser control.

Categories : C#

How can I use wildcards or regular expressions to control Path-based authorization / access control for svn?
as of June 2013 it is impossible to do this. So, the solution to the problem is to re-organize the repository so this isn't necessary. When a thing is too difficult it usually leads to a large rethink of the design or approach. At present maven structure leads to this requirement: root/pom.xml root/project1/pom.xml root/project2/pom.xml etc.. We can replace this with /root/pom.xml /project1/pom.xml /project2/pom.xml etc.. We can set the svn perms as follows granting all read access to the top level project and read write to their project. If an continuous integration build server populates an internal maven repo with the root snapshot then the users only need to checkout specific projects. [repo:/root] * = r @releng = rw [repo:/project1] @teamOne = rw [repo:/project2] @teamTwo =

Categories : Svn

Border doesn't inherit Control, so how does a setter on Control.Background work?
Background dependency property in WPF is shared by many classes. It is defined in the Panel class, other classes just call AddOwner on it. Border.cs [CommonDependencyProperty] public static readonly DependencyProperty BackgroundProperty = Panel.BackgroundProperty.AddOwner( typeof (Border), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.SubPropertiesDoNotAffectRender)); Panel.cs [CommonDependencyProperty] public static readonly DependencyProperty BackgroundProperty = DependencyProperty.Register("Background", typeof(Brush), typeof(Panel), new FrameworkPropertyMetadata((Brush)null, FrameworkPropertyMetadataOptions.AffectsRender |

Categories : Wpf

Black lines when adding custom control to a panel with Control's DockStyle set to Top
Finally I found the solution to my problem. I was setting the Comment control's AutoSize property to true. When I set it false, it worked. Thanks @Sayse, your comment gave me hint about it.

Categories : C#

adding Control to form but gap keeps doubling when added at Bottom of previous control
this is more of a hack but it works. sharpUserX.Size = sharpUserSize PnlSharpUsers.Controls.Add(sharpUserX) sharpUserX.Location = pnlAddBtn.Location if i set the size before i add the control, then set the location after it seems to apply the font scaling to the size, but not the location, which works perfectly for me.

Categories : C#

how to restrict child control inside Parent control in Winform application?
if you add the label to the panel dynamically then you must do: this.panel1.Controls.Add(this.button1); if you don't, that the mistake. On top of that, when you move the label, make sure that the new values are inside the range of the panel, using panel1.Location.X panel1.Location.Y and share your code for more help if needed

Categories : C#

jump to search result in a repeat control with a pager control in a xpages
A few pointers that might help you to go ahead: stop paging in repeats. The extlib has a nice sample of "show more", so instead of showing 1-20, 21-40 etc. you show until the record you found (might not work for large datasets) Open the search page with URL parameters that indicate the position number of the document (e.g. 498). Then use that parameter to let the repeat control figure out the starting position (which depends on the number of documents the repeat is configured for (default is 30, but you don't know). Just make sure not to use the passed parameter unchecked. you can add <a name="[unid]"> (or id=) tags to the repeat and then [directly navigate] (http://reference.sitepoint.com/html/a) to them ....nsf/searchResults.xsp#unid?moreParameters Let us know how it goes

Categories : Misc

Button sizes changing on user control when control is added to window
You have don't have your LastChildFill property set to False on your top DockPanel. This is the reason "Ent" is changing size and moving your screen. You also have the HorizontalAlignment on "Del" set to stretch. Try setting that to Left, but might be moot with the LastChildFill correction. The overall resizing is do to HorizontalAlignment set to Stretch set that to Left.

Categories : Wpf

Tap event on dynamically added custom control is handled by another control of same type
I figured out the problem, and I am chocking it up to lack of experience with WPF. When I made my Waypoints I created them like to var newWaypoint = new Waypoint(waypointNumber, latitude, longitude); newWaypoint.Name = "wayPoint" + waypointNumber; newWaypoint.Opacity = 100; double leftMargin = CalculateLeftMargin(longitude); double topMargin = CalculateTopMargin(latitude); newWaypoint.Margin = new Thickness(leftMargin, topMargin, 0, 0); LayoutRoot.Children.Add(newWaypoint); The problem with that was that I was setting the Margin of the control. When I set the Margin it was actually stretching out my Waypoint so I was having Waypoints on top of Waypoints. After some research I came across this article Changing Position of an Element Programmatically in WPF which showed me how to prope

Categories : C#

Update parent control when the child control is manually removed in the designer
To wrap it up, I found a solution to my problem. Like a TabControl, my ButtonList contains two collections: ControlCollection inherited from the Control class ButtonListItemCollection (TabControl has TabPageCollection) Adding ButtonListItems is done via the collection editor in the properties. Removing can be done either in the collection editor or just by selecting the ButtonListItem in the designer and pressing the DEL button on the keyboard (manual deletion). When using the collection editor, ButtonListItems are added/removed to/from the ButtonListItemCollection and then to/from the ControlCollection. However, when a ButtonListItem is manually deleted it is only deleted from the ControlCollection not from the ButtonListItemCollection. So what needs to be done is to detect when the

Categories : C#

ms-access 2007 form datetime control : if control length smaller than the size of the value it shows ###
Access doesn't behave like this. You can either increase the width of the control (the best solution) specify a shorter Format for the date reduce the font size An odd approach would be to add a label which obscures some of the date-control, but such that you can still see part of the date in the background. You might consider using an event such as Focus to change the Format of the control, but this won't work as the Format only applies when you move away from the control. You could, I suppose, use two controls; one for display and one for editing.

Categories : Forms



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.