Search Results

Search found 143 results on 6 pages for 'caret'.

Page 5/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Can I change the user that is the default choice in UAC?

    - by Will
    Windows 7 install. I RANU, so I have to hit the UAC every once in awhile. The problem is that it asks me to enter my password to elevate, but I need to enter the domain\username of the box admin (I'm on a domain) and the password. Instead of UAC popping up with my username entered and the caret in the password box, I'd like it to pop up with the domain\username of a different user, specifically the local admin account, entered. This would save me a click and some typing. Sue me, I'm lazy. Is this possible?

    Read the article

  • Fix Firefox Not Scrolling with Up/Down Arrow Keys or Home/End Keys

    - by The Geek
    If you’ve encountered a problem where your Firefox installation no longer scrolls when you use the up or down arrow keys, and even the Home or End keys don’t work anymore, there’s an easy fix. When this problem happens, you’ll notice that moving the arrow keys around just moves the cursor around the page. Annoying! The problem is because you tripped the Caret Browsing feature at some point, and accidentally hit Yes. To fix this, you can just hit the F7 key again. Or, if you want to do it the about:config way, filter by accessibility.browsewithcaret and make sure it’s set to false. Remember, you can double-click on any boolean value to toggle between true and false. Similar Articles Productive Geek Tips Keyboard Ninja: Scrolling the Windows Command Prompt With Only the KeyboardShow Shortcut Keys in ScreenTips in Visual Studio 2003Show Shortcut Keys in ScreenTips in Visual Studio 2005Future Date a Post in Windows Live WriterDisable the Irritating Sticky / Filter Keys Popup Dialogs TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Need Help with Your Home Network? Awesome Lyrics Finder for Winamp & Windows Media Player Download Videos from Hulu Pixels invade Manhattan Convert PDF files to ePub to read on your iPad Hide Your Confidential Files Inside Images

    Read the article

  • ScreenManagement better practices ?! Textbox not focusing

    - by xykudyax
    I saw a question here using DataTemplates with WPF for ScreenManagement, I was curious and I gave it a try I think the ideia is amazing and very clean. Though I'm new to WPF and I read a lot of times that almost everything should be made in XAML and very little should be "coded behind". My questions resolves about using the datatemplate ideia, WHERE should the code that calls the transitions be? where should I define which commands are avaiable in which screens. For example: [ScreenA] Commands: Pressing B - Goes to state B Pressing ESC - Exits [ScreenB] Commands: Pressing A - Goes to state A Pressing SPACE - Exits where do I define the keyEventHandlers? and where do I call the next screen? I'm doing this as an hobby for learning and "if you are learning, better learn it right" :) Thank you for your time. Yes the Q/A I was talking is: What's a good way to handle game screen management in WPF? What I've done so far was to create a Screen class (derived from UserControl) and create some virtual methods: - one for Initializing stuff (like focus a given component by default) - another for inputHandling I handle it by using a switch case and by listening to the PreviewKeyDown event from the parent container (MainWindow) Im not able to do it another way! Help?!. - and a finally one that removes the keyEvent method (when the screen is terminated) Parent.PreviewKeyDown -= OnKeyDown; am I doing okay? I face a problem. When I add a new screen (userControl) containing a TextBox I'm not able to give it autofocus :/ The Caret is there but is not blinking and I have to hit "TAB" before being able to input anything at all :/

    Read the article

  • How to check for changes on remote (origin) git repository?

    - by Lernkurve
    Question What are the Git commands to do the following workflow? Scenario: I cloned from a repository and did some commits of my own to my local repository. In the meantime, my colleagues did commits to the remote repository. Now, I want to: Check whether there are any new commits from other people on the remote repository, i.e. "origin"? Say there were 3 new commits on the remote repository since mine last pull, I would like to diff the remote repository's commits, i.e. HEAD~3 with HEAD~2, HEAD~2 with HEAD~1 and HEAD~1 with HEAD. After knowing what changed remotely, I want to get the latest commits from the others. My findings so far For step 2: I know the caret notation HEAD^, HEAD^^ etc. and the tilde notation HEAD ~2, HEAD~3 etc. For step 3: That is, I guess, just a git pull.

    Read the article

  • Proper indentation in array initialization, PDT/Zend Studio

    - by Sergei Stolyarov
    I'm using the following style of array initialization in the code: $a = array( 'one' => 123, 'two' => 456 ); But PDT/Zend Studio doesn't work properly in this case; after pressing [Return] key it places cursor under the $a (in my example) and ignores indentation. If array keys are numbers (at least not start with quotation marks) everything is working fine. This is how it works currently (| — is a position where edtitor places caret after pressing [Return]) $a = array( 'one' => 123,[RETURN] | ); This is expected result: $a = array( 'one' => 123,[RETURN] | ); So is it possible to force editor follow my indentation rules?

    Read the article

  • Textarea for my web application

    - by Parhs
    Hello ... I am developing an application web based which would let the users extend a part of an applcation using javascript via java.scripting http://java.sun.com/javase/6/docs/technotes/guides/scripting/programmer_guide/index.html The problem is that the user should write only some coditions and i want if possible to colour some special words and to check while typing if the variable that the user is typing exists.. Like a auto suggest thing... I searched at the web but didnt find many stuff. For WYSIWYG editors i couldnt determine if you can programaticcaly apply stuff and set/get caret position. Also i show that autosuggest is nearly impossible. It should be locatted outside of the textbox area.

    Read the article

  • Does Eclipse has a plugin for code clips like in Coda?

    - by Sinan Y.
    There is a very useful "Clips" feature in Coda, do we have such thing in Eclipse? What it does is pretty simple, you save once a code clip which you use very often and assign it a shortcut and when you want to re-use it on editor you type the shortcut you assigned and it automatically pastes that code clip and sets caret position to the defined position. On the example here (second image) when i write 4dom and press TAB afterwards it types me this... jQuery(function($){ //puts cursor here }); Since it is a very useful feature i miss that one on Eclipse, is there a plugin for this? Thanks, Sinan.

    Read the article

  • Ruby RegEx not matching valid expression

    - by Matthew Carriere
    I have the following expression: ^\w(\s(+|-|\/|*)\s\w)*$ This simply looks to match a mathematical expression, where a user is prompted for terms separated by basic operators (ex: price + tax) The user may enter more than just 2 terms and one operator (ex: price + tax + moretax) I tested this expression in Rubular http://rubular.com/ With the terms: a + a (MATCH) a + a + a (MATCH) a + a + a + a a a + a a Everything works, but when I use it in Ruby it does not work! expression =~ /^\w(\s(+|-|\/|*)\s\w)*$/ I started picking the expression apart and noticed that if I remove the start of line caret it finds matches but isn't correct. a + a (MATCH) a a (MATCH) <-- this is not correct Why is this expression not working in Ruby code? (I am using Ruby 1.8.7 p174)

    Read the article

  • XSD traversal in VIM

    - by maayank
    I use VIM as my text editor and I edit a lot of XML and WSDL files. WSDL files have an XSD section. Is there some VIM plugin I can use to traverse the XSD types? i.e., if I have the following line and the caret is where the '|' sign is: <xsd:element minOccurs="0" name="FooName" type="Magic|FooType"/> and I press Ctrl+Alt+Foo (or some other magic combo) it will get me to the definition of MagicFooType, i.e.: <xsd:complexType name="MagicFooType"> I couldn't find how to use ctags for this and all the other plugins that I could find are for imperative languages (i.e. Java). Is there some plugin/script to do the job?

    Read the article

  • Adding DOM elements using contentEditable

    - by zorglub76
    Hi all, I've created an editable div, and I want to replace smiley signs with smiley images. But whenever I replace a string with a dom element (<img> or <span> or whatever..), the div stops being editable (i.e. I can see the caret when I click on text, but can add no characters to it). What's going on? (I'm doing this in Safari) Here's my code: var txtInput = document.getElementById("asdf"); txtInput.contentEditable = true; txtInput.addEventListener("textInput", function(event){ var str = txtInput.innerHTML; txtInput.innerHTML = str.replace("f", "<span>w<span>"); }, false);

    Read the article

  • Unable to Calculate Position within Owner-Draw Text

    - by Jonathan Wood
    I'm trying to use Visual Studio 2012 to create a Windows Forms application that can place the caret at the current position within a owner-drawn string. However, I've been unable to find a way to accurately calculate that position. I've done this successfully before in C++. I've now tried numerous methods in C#. Originally, I tried using .NET classes to determine the correct position, but then I tried accessing the Windows API directly. In some cases, I came close, but after some time I still cannot place the caret accurately. I've created a small test program and posted key parts below. I've also posted the entire project here. The exact font used is not important to me; however, my application assumes a mono-spaced font. Any help is appreciated. Form1.cs This is my main form. public partial class Form1 : Form { private string TestString; private int AveCharWidth; private int Position; public Form1() { InitializeComponent(); TestString = "123456789012345678901234567890123456789012345678901234567890"; AveCharWidth = GetFontWidth(); Position = 0; } private void Form1_Load(object sender, EventArgs e) { Font = new Font(FontFamily.GenericMonospace, 12, FontStyle.Regular, GraphicsUnit.Pixel); } protected override void OnGotFocus(EventArgs e) { Windows.CreateCaret(Handle, (IntPtr)0, 2, (int)Font.Height); Windows.ShowCaret(Handle); UpdateCaretPosition(); base.OnGotFocus(e); } protected void UpdateCaretPosition() { Windows.SetCaretPos(Padding.Left + (Position * AveCharWidth), Padding.Top); } protected override void OnLostFocus(EventArgs e) { Windows.HideCaret(Handle); Windows.DestroyCaret(); base.OnLostFocus(e); } protected override void OnPaint(PaintEventArgs e) { e.Graphics.DrawString(TestString, Font, SystemBrushes.WindowText, new PointF(Padding.Left, Padding.Top)); } protected override bool IsInputKey(Keys keyData) { switch (keyData) { case Keys.Right: case Keys.Left: return true; } return base.IsInputKey(keyData); } protected override void OnKeyDown(KeyEventArgs e) { switch (e.KeyCode) { case Keys.Left: Position = Math.Max(Position - 1, 0); UpdateCaretPosition(); break; case Keys.Right: Position = Math.Min(Position + 1, TestString.Length); UpdateCaretPosition(); break; } base.OnKeyDown(e); } protected int GetFontWidth() { int AverageCharWidth = 0; using (var graphics = this.CreateGraphics()) { try { Windows.TEXTMETRIC tm; var hdc = graphics.GetHdc(); IntPtr hFont = this.Font.ToHfont(); IntPtr hOldFont = Windows.SelectObject(hdc, hFont); var a = Windows.GetTextMetrics(hdc, out tm); var b = Windows.SelectObject(hdc, hOldFont); var c = Windows.DeleteObject(hFont); AverageCharWidth = tm.tmAveCharWidth; } catch { } finally { graphics.ReleaseHdc(); } } return AverageCharWidth; } } Windows.cs Here are my Windows API declarations. public static class Windows { [Serializable, StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct TEXTMETRIC { public int tmHeight; public int tmAscent; public int tmDescent; public int tmInternalLeading; public int tmExternalLeading; public int tmAveCharWidth; public int tmMaxCharWidth; public int tmWeight; public int tmOverhang; public int tmDigitizedAspectX; public int tmDigitizedAspectY; public short tmFirstChar; public short tmLastChar; public short tmDefaultChar; public short tmBreakChar; public byte tmItalic; public byte tmUnderlined; public byte tmStruckOut; public byte tmPitchAndFamily; public byte tmCharSet; } [DllImport("user32.dll")] public static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight); [DllImport("User32.dll")] public static extern bool SetCaretPos(int x, int y); [DllImport("User32.dll")] public static extern bool DestroyCaret(); [DllImport("User32.dll")] public static extern bool ShowCaret(IntPtr hWnd); [DllImport("User32.dll")] public static extern bool HideCaret(IntPtr hWnd); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] public static extern bool GetTextMetrics(IntPtr hdc, out TEXTMETRIC lptm); [DllImport("gdi32.dll")] public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj); [DllImport("GDI32.dll")] public static extern bool DeleteObject(IntPtr hObject); }

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry for this newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:18:20 +0200

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry if this is a newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE, in a .HTM file encoded in ANSI, Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:42:20 +0200

    Read the article

  • Using GetLineStartPosition to get the end of a line in WPF RichTextBox.

    - by Alan Spark
    A bit of background. I would like to be able to process text for the line that the caret is on in a WPF RichTextBox. Please see my earlier question about the TextPointer class: http://stackoverflow.com/questions/3046162/how-to-keep-track-of-textpointer-in-wpf-richtextbox. I know how to get the TextPointer at the start of the current line by using GetLineStartPosition with 0 as the argument but would now like to get the TextPointer at the end of the line. It was suggested in my previous question that this is possible using the GetLineStartPosition method. I would appreciate it if someone can explain a bit about how the GetLineStartPosition works with regard to end of line pointers. Thanks in advance for any help.

    Read the article

  • Click event of buttons is not fired when it causes onChange event of textbox is fired first

    - by bakkujp
    Hi All, I have a textbox like below <h:inputText value="#{bean.strQuantite}"> <a4j:support actionListener="#{tabacListCommandeAltadisDetailBean.actionListenerQuantity}" event="onchange" /> </h:inputText> I input some value into the textbox above and keep the caret inside the textbox. After that, when I continue to click a other button, the event onchange of the input text above is fired. I want to when clicking the button, the click event is fired before. Can anyone help me to solve this problem ?

    Read the article

  • Float a div on a textarea?

    - by Pradeep
    I have a div which has this list of suggestions. But i need to allocate it at the caret position of the textarea. Is this possible if yes, help me to do it. function findOffsetPosition(obj) { var posX = obj.clientLeft; var posY = obj.clientTop; while (obj.offsetParent) { if (obj == document.getElementsByTagName('body')[0]) { break } else { posX = posX + obj.offsetParent.offsetLeft; posY = posY + obj.offsetParent.offsetTop; obj = obj.offsetParent; } } var posArray = [posX, posY] return posArray; }

    Read the article

  • Cursor lag when mouse cursor changes?

    - by Mathias Lykkegaard Lorenzen
    Cursor lag issue Introduction I'm experiencing a newly arrived problem lately that frustrates me a lot. The computer I bought is a Clevo 150ERM. Two of my friends bought the same machine, and are experiencing the same issue. The computer came with Windows 7. There, I had no issues. Then, when we all switched to Windows 8, they had the mouse problem and I didn't. That is until after 4 or 5 months when I decided to install the RTM driver of my Intel graphics chip, and the latest Nvidia driver. I also installed the latest version of Skype that just released (Skype 6 and Skype for Metro). This basically leads me to conclude that the issue is not hardware-prone, and is not based on the operating system itself, rather the drivers or components that follow with it. Description of the issue The issue itself (lag with the mouse) happens whenever the cursor icon changes. For instance, if I keep hovering from and to a textfield (and the cursor changes into a caret and then back to a mouse), it stops for 200 milliseconds while it changes the icon. An example is if I follow the mouse in the pattern shown by the arrows below. When crossing the window border, the cursor changes into a "resize window" cursor for a short while, making the cursor lag. This doesn't sound like much, but it happens every time the cursor changes (even if it's to just move the mouse somewhere else, and accidentally make it cross a window border from where the resize cursor shows etc). What do you suggest I try?

    Read the article

  • Win2008: Boot from mirrored dynamic disk fails!

    - by Daniel Marschall
    Hello. I am using Windows Server 2008 R2 Datacenter and I got two 1.5TB S-ATA2 hard disks installed and I want to make a soft raid. (I do know the disadvantages of softraid vs. hardraid) I have following partitions on Disk 0: (1) Microsoft Reserved 100 MB (dynamic), created during setup (2) System Partition 100 GB (dynamic) (3) Data partition, 1.2TB (dynamic) I already mirrored these contents to Disk 1. Its contents are: (1) System partition mirror, 100 GB (dynamic) (2) Data partition, 1.2 TB mirror (dynamic) (3) Unusued 100 MB (dynamic) -- is from "MSR" of Disk 0, created during setup. Since data and system partition are mirrored, I expect that my system works if disk 0 would fail. But it doesn't. If I force booting on disk 0: Works (I get the 2 bootloader screen) If I force booting on disk 1 (F8 for BBS), nothing happens. I got a blank black screen with the blinking caret. I already made disk1/partition1 active with diskpart, but it still does not boot from this drive. Please help. Both partitions are in "MBR" partition style. They look equal, except the missing "MSR" partition at the partition beginning (which seems to be not relevant to booting). Regards Daniel Marschall

    Read the article

  • Start Learning Ruby with IronRuby – Setting up the Environment

    - by kazimanzurrashid
    Recently I have decided to learn Ruby and for last few days I am playing with IronRuby. Learning a new thing is always been a fun and when it comes to adorable language like Ruby it becomes more entertaining. Like any other language, first we have to create the development environment. In order to run IronRuby we have to download the binaries form the IronRuby CodePlex project. IronRuby supports both .NET 2.0 and .NET 4, but .NET 4 is the recommended version, you can download either the installation or the zip file. If you download the zip file make sure you added the bin directory in the environment path variable. Once you are done, open up the command prompt and type : ir –v It should print message like: IronRuby 1.0.0.0 on .NET 4.0.30319.1 The ir is 32bit version of IronRuby, if you want to use 64bit you can try ir64. Next, we have to find a editor where we can write our Ruby code as there is currently no integration story of IronRuby with Visual Studio like its twin Iron Python. Among the free IDEs only SharpDevelop has the IronRuby support but it does not have auto complete or debugging built into it, only thing that it supports is the syntax highlighting, so using a text editor which has the same features is nothing different comparing to it. To play with the IronRuby we will be using Notepad++, which can be downloaded from its sourceforge download page. The Notepad++ does have a nice syntax highlighting support : I am using the Vibrant Ink with some little modification. The next thing we have to do is configure the Notepad++ that we can run the Ruby script in IronRuby inside the Notepad++. Lets create a batch(.bat) file in the IronRuby bin directory, which will have the following content: @echo off  cls call ir %1 pause This will make sure that the console will be paused once we run the script. Now click Run->Run in the Notepad++, it will bring up the run dialog and put the following command in the textbox: riir.bat "$(FULL_CURRENT_PATH)" Click the save which will bring another dialog. Type Iron Ruby and assign the shortcut to ctrl + f5 (Same as Visual Studio Start without Debugging) and click ok. Once you are done you will find the IronRuby in the Run menu. Now press ctrl + f5, we will find the ruby script running in the IronRuby. Now there are one last thing that we would like to add which is poor man’s context sensitive help. First, download the ruby language help file from the Ruby Installer site and extract into a directory. Next we will have to install the Language Help Plug-in of Notepad++, click Plugins->Plugin Manger –>Show Plugin Manager and scroll down until you find the plug-in the list, now check the plug-in and click install. Once it is installed it will prompt you to restart the Notepad++, click yes. When the Notepad++ restarts, click the Plugins –> Language Help –> Options –> add and enter the following details and click ok: The chm file location can be different depending upon where you extracted it. Now when you put your in any of ruby keyword and press ctrl + f1 it will take you to the help topic of that keyword. For example, when my caret is in the each of the following code and I press ctrl + f1, it will take me to the each api doc of Array. def loop_demo (1..10).each{ |n| puts n} end loop_demo That’s it for today. Happy Ruby coding.

    Read the article

  • Instant Rename and Rename Refactoring

    - by Petr
    During the last weeks I have got  a few questions about rename refactoring and some users also complain to me that the refactoring in NetBeans 6.x was much faster. So I would like to explain the situation. For some people, who don't know, Instant Rename action and Rename Refactoring  can look like one action. But it's not true, even if  both actions use the same shortcut (CTRL + R). NetBeans 6.x contained only Instant Rename action (speaking about PHP support), which we can mark as very simple rename refactoring through one file. From NetBeans 7.0 the Instant Rename action works only in "non public" context. It means that this action is used for fast renaming variables that has local context like inside a method, or for renaming private methods and fields that can not be used outside of the scope, where they are declared. From user point of view these two action can be simply recognized. When is after CTRL+R called Instant Rename action, then the identifier is surrounded with rectangle and you can rename it directly in the file. It's fast and simple, also the usages of this identifier are renamed in the same time as you write. The picture below shows Instant Rename action for $message identifier, that is visible only in the print_test method and due this after CTRL+R is called Instant Rename. In NetBeans 7.0, there was added Rename Refactoring that is called for public identifiers. It means for identifiers that could be used in other files. If you press CTRL+R shortcut when the caret is inside $hello identifier from the picture above, NetBeans recognizes that $hello is declared / used in a global context and calls the Rename Refactoring that brings a dialog to change the name of the identifier. From this dialog you have to preview suggested changes, through pressing Preview button and then execute the refactoring through Do Refactoring button. Yes, it's more complicated from user point of view than Instant Rename, but in Rename Refactoring NetBeans can change more files at once. It should be  the developer responsibility to decide whether the suggested changes are right and the refactoring can be executed or in some files original name should be kept. Someone can argue that he doesn't use $hello variable in any other file so Instant Rename could be used in such case. Yes it's true, but in such case NetBeans has to know all usages of all identifiers and keep this informations up to date during editing a file. I'm sure that this is not possible due to the performance problems, mainly for big projects. So the usages are computed after pressing the Preview button. And why is the Refactor button always disabled in the Rename dialog and user has to always go through the preview phase? NetBeans has API and SPI for implementing refactoring actions and this dialog is a part of this infrastructure. If you rename an identifier for example in Java, the Refactor buttons is enabled, but Java is strongly type language and you can be almost in 99% sure that the IDE will suggest the right results. In PHP as a dynamic language, we can not be sure, what NetBeans finds is only a "guess". This is why NetBeans pushes developers to preview the changes for PHP rename. I hope that I have explain it clearly. I'm open to any discussion. What I have described above is situation in NetBeans 7.0, 7.0.1 and probably it will be also in NetBeans 7.1, because there is no plan to change it. Please write your opinion here.

    Read the article

  • Silverlight - use a ScrollViewer in a TextBox template

    - by vladhorby
    I'm trying to make a TextBox template and I need to include a ScrollViewer in the template - basically I want to add some content (like line numbers) that needs to scroll along with the normal text. The default template for the TextBox is like this: <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1"> <Grid> <Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" Opacity="0"/> <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1"> <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}"/> </Border> </Grid> </Border> If I change the ContentElement from ScrollViewer to Border, for example, the TextBox behaves normally - i just lose the scrolling ability. Now, if I wrap the ContentElement with a ScrollViewer, it no longer displays the caret and selection - if you type, it still gets updated though. <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1" Opacity="1"> <Grid> <Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" Opacity="0"/> <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1"> <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" > <Border x:Name="ContentElement" BorderThickness="0" Padding="{TemplateBinding Padding}" /> </ScrollViewer> </Border> </Grid> </Border> Any idea why this happens and how can I fix it?

    Read the article

  • WPF RibbonTextBox Width problem

    - by morsanu
    Hey guys, It seems to me that the Ribbon control has a problem with textboxes. I was expecting a common TextBox control behaviour: a fixed width and a visible caret when the text exceeds the width. But the RibbonTextBox control changes its width and when the text exceeds the right limit, the overflow is not visible. I found a hack on a blog that does something like this: var img = SearchButton.Template.FindName("image", SearchButton); if (img != null && img is Image) (img as Image).Visibility = Visibility.Collapsed; var lbl = FindTemplateControl<Label>(SearchText); var border = SearchText.Template.FindName("Bd", SearchText); if (border != null && border is Border && img != null && lbl != null) { (border as Border).Width = SearchText.ActualWidth - (((Image)img).ActualWidth + lbl.ActualWidth); } but I reallly don't want to do such a workaround. Is there any other simpler way to achieve simple TextBox behaviour?

    Read the article

  • BorderLayout problem with JSplitPane after adding JToolbar (Java)

    - by Alex Cheng
    Hello all. Problem: My program layout is fine, as below before I add JToolbar to BorderLayout.PAGE_START Here's a screenshot before JToolbar is added: Here's how it looked like after adding JToolbar: May I know what did I do wrong? Here's the code I used: //Create the text pane and configure it. textPane = new JTextPane(); -snipped code- JScrollPane scrollPane = new JScrollPane(textPane); scrollPane.setPreferredSize(new Dimension(300, 300)); //Create the text area for the status log and configure it. changeLog = new JTextArea(5, 30); changeLog.setEditable(false); JScrollPane scrollPaneForLog = new JScrollPane(changeLog); //Create a split pane for the change log and the text area. JSplitPane splitPane = new JSplitPane( JSplitPane.VERTICAL_SPLIT, scrollPane, scrollPaneForLog); splitPane.setOneTouchExpandable(true); //Create the status area. JPanel statusPane = new JPanel(new GridLayout(1, 1)); CaretListenerLabel caretListenerLabel = new CaretListenerLabel("Caret Status"); statusPane.add(caretListenerLabel); //Create the toolbar JToolBar toolBar = new JToolBar(); -snipped code- //Add the components. getContentPane().add(toolBar, BorderLayout.PAGE_START); getContentPane().add(splitPane, BorderLayout.CENTER); getContentPane().add(statusPane, BorderLayout.PAGE_END); //Set up the menu bar. actions = createActionTable(textPane); JMenu editMenu = createEditMenu(); JMenu styleMenu = createStyleMenu(); JMenuBar mb = new JMenuBar(); mb.add(editMenu); mb.add(styleMenu); setJMenuBar(mb); Please help, I'm new to GUI Building, and I don't feel like using Netbeans to drag and drop the UI for me... Thank you in advance.

    Read the article

  • Algorithm to detect how many words typed, also multi sentence support (Java)

    - by Alex Cheng
    Hello all. Problem: I have to design an algorithm, which does the following for me: Say that I have a line (e.g.) alert tcp 192.168.1.1 (caret is currently here) The algorithm should process this line, and return a value of 4. I coded something for it, I know it's sloppy, but it works, partly. private int counter = 0; public void determineRuleActionRegion(String str, int index) { if (str.length() == 0 || str.indexOf(" ") == -1) { triggerSuggestionList(1); return; } //remove duplicate space, spaces in front and back before searching int num = str.trim().replaceAll(" +", " ").indexOf(" ", index); //Check for occurances of spaces, recursively if (num == -1) { //if there is no space //no need to check if it's 0 times it will assign to 1 triggerSuggestionList(counter + 1); counter = 0; return; //set to rule action } else { //there is a space counter++; determineRuleActionRegion(str, num + 1); } } //end of determineactionRegion() So basically I find for the space and determine the region (number of words typed). However, I want it to change upon the user pressing space bar <space character>. How may I go around with the current code? Or better yet, how would one suggest me to do it the correct way? I'm figuring out on BreakIterator for this case... To add to that, I believe my algorithm won't work for multi sentences. How should I address this problem as well. -- The source of String str is acquired from textPane.getText(0, pos + 1);, the JTextPane. Thanks in advance. Do let me know if my question is still not specific enough.

    Read the article

  • TextArea being used as an itemEditor misbehaves when the enter key is pressed

    - by ChrisInCambo
    Hi, I have a TextArea inside an itemEditor component, the problem is that when typing in the TextArea if the enter key is pressed the itemEditor resets itself rather moving the caret to the next line as expected: <mx:List width="100%" editable="true" > <mx:dataProvider> <mx:ArrayCollection> <mx:Array> <mx:Object title="Stairway to Heaven" /> </mx:Array> </mx:ArrayCollection> </mx:dataProvider> <mx:itemRenderer> <mx:Component> <mx:Text height="100" text="{data.title}"/> </mx:Component> </mx:itemRenderer> <mx:itemEditor> <mx:Component> <mx:TextArea height="100" text="{data.title}"/> </mx:Component> </mx:itemEditor> </mx:List> </mx:Application> Could anyone advise how I can get around this strange behaviour and make the enter key behave as expected? Thanks, Chris

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >