Unable to SHIFT-TAB in empty RadWatermarkTextBox

15 posts, 0 answers
  1. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 08 Nov 2011 Link to this post

    When using a normal TextBox I can TAB over it forwards and backwards (SHIFT-TAB) no matter if it contains text or not. When using RadWatermarkTextBox the SHIFT-TAB does nothing (control after RadWatermarkTextBox stays focused) when there is no text in the RadWatermarkTextBox. This behaviour probably has to do with the SelectionOnFocus-Mode. But no matter what I set here, I cannot TAB backwards in an EMPTY RadWatermarkTextBox.

    Is this a bug or a feature? Any help would be appreciated.

    Thank you,
    Stephan

  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 09 Nov 2011 Link to this post

    Hello Stephan,

    I have tried to reproduce the problem but I was unable to. I am sending you my test project. I would highly apreciate it if you could send me a sample project demonstrating the problem, so I can look into it. 

    Greetings,
    Nikolay Vasilev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 09 Nov 2011 Link to this post

    Hi Nikolay,

    thank you for your answer. Of course you're right. Your test project works indeed. But as soon as you switch to the Metro theme
    StyleManager.ApplicationTheme = new MetroTheme();
    

    you will see that you cannot backwards tab anymore. Sorry, that I didn't mention Metro and sorry that I didn't test it with another theme beforehand. Otherwise I would have probably posted it in another forum.

    Maybe you can help me anyway.

    Thank you,
    Stephan


  5. Nick
    Admin
    Nick avatar
    593 posts

    Posted 09 Nov 2011 Link to this post

    Hi Stephan,

    I tried again to reproduce the problem. I have attached the test product that I used.
    However even applying the Metro theme did not affect the desired functionality. Again, I would really apreciate it if you could send me a sample of your project, so I can be able look into it and provide some help with the problem. 

    All the best,
    Nikolay Vasilev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 09 Nov 2011 Link to this post

    Hi Nikolay,

    as mentioned in your docs you should apply the application theme BEFORE calling InitializeComponent(). If you change your demo like this, you'll see the error.

    StyleManager.ApplicationTheme = new MetroTheme();
    InitializeComponent();

    Cheers,
    Stephan
  7. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 09 Nov 2011 Link to this post

    Ok, as far as I can see the problem is that the "WatermarkVisualElement"-contentcontrol in the RadWatermarkTextBox template captures the focus on SHIFT-TAB. If you apply an IsTabStop=false to "WatermarkVisualElement" it works. Could you please confirm this and add it to your next build if that's the correct fix?

    And while you're changing the RadWatermarkTextBox-template you could fix another bug: Usually one applies the Telerik styles to the native controls as well to get a consistent look. However, if you to this for scrollviewer like this in app.xaml

    <Style TargetType="ScrollViewer" t:StyleManager.BasedOn="Metro"/>

    you'll notice, that all RadWatermarkTextBoxes loose their border which looks completely stupid. I think this is because in contrast to the native ScrollViewer style, the Metro style for a ScrollViewer stretches the viewer in both directions which eventually hides the border element of RWTB which is under/before the ScrollViewer (see the RWTB template).

    To fix this issue you could apply a Margin=1 to the ScrollViewer element ("ContentElement") in the RWTB template so that the border element will shine through.

    I would be very glad if you could apply both fixes in the next build.


    Regards,
    Stephan

  8. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 09 Nov 2011 Link to this post

    Well, I just noticed that setting Margin=1 on the ScrollViewer increases the height of RWTB by 2 px which is not consistent with other controls like combobox (22px). I'm sure you have a better idea. Maybe setting the border directly on the ScrollViewer instead of forcing it to 0. This would definitely work. The only "downside" of this is that you'll notice 4 little black dots in the RWTB edges on mouse over. But this is only because the "ScrollViewerControlTemplate" style has CornerRadius="2" which is probably a copy and paste legacy from the native template and not consistent with the rest of Metro anyway. So I would suggest setting CornerRadius="0" in "ScrollViewerControlTemplate" and apply the RadWatermarkTextBox border directly to its internal ScrollViewer. This would fix two bugs in one go and would look better and more consistent as well.

    Hope to hear from you tomorrow.

    Stephan
  9. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 10 Nov 2011 Link to this post

    Ok, as noted above, the RWTB border is hidden by by a stretched ScrollViewer which has its background set to MainBrush. Setting the background to null/transparent would work as well but I don't know if there would be other sideeffects then.
  10. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 10 Nov 2011 Link to this post

    Any news, Nikolay?
  11. Pana
    Admin
    Pana avatar
    748 posts

    Posted 11 Nov 2011 Link to this post

    Hi,

    RadWatermarkTextBox was intended to be used as a PART inside the RadDateTimePicker but over time clients found it and started using it although it is not officially announced and has no demos or help page. I am sure it is quite a useful control so we will do our best to fix the issues you have found.

    The updates will not be available in the Q3 release. Simply there is not enough time to fix and more important test them. I believe we will update the RadWatermarkTextBox in one of the first internal build from the upcoming Q.

    Thank you very much for the feedback it is greatly appreciated.

    Greetings,
    Pana
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  12. Marc
    Marc avatar
    88 posts
    Member since:
    Jul 2011

    Posted 11 Nov 2011 Link to this post

    Ok, thank you for your response.
  13. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 20 Jun 2012 Link to this post

    Does any body know if this issue is solved in current version? I can navigate forward throw RadWatermarkTextBoxes using CTRL key but I cannot navigate backward with SHIGT + TAB keys.
  14. Georgi
    Admin
    Georgi avatar
    347 posts

    Posted 25 Jun 2012 Link to this post

    Hi Daní,

    The issue is fixed and it is not present in our latest release ( Q2 2012). As you can see in the attached video navigating backwards with Shift+Tab works just fine.

    All the best,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  15. Daní
    Daní avatar
    303 posts
    Member since:
    Feb 2008

    Posted 25 Jun 2012 Link to this post

    Hi Georgi,

    I'm using Q1 2012 SP1 release. And backward navigation is not working in metro theme (I haven't tested any other theme).

    So, although the issue is fixed is not present yet in Q2 2012 release, is it?
    Thanks
  16. Georgi
    Admin
    Georgi avatar
    347 posts

    Posted 25 Jun 2012 Link to this post

    Hi Daní,

    I have just tasted it with Q1 2012 SP1 and you are right that it is not working. What I have meant is that the issue is fixed and the issue is not present in Q2 2012, meaning that the fix is available in Q2 2012 release.

    All the best,
    Georgi
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner