SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-22-2006, 11:42 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
TextInput Widget focus for multiple input fields

This reminds me:
Quote:
SageTV doesn't allow to set the focus for text input widgets
There is a way to handle focus for a TextInput widget, which allows the use of multiple text input fields to be on the screen at once.

Item widgets (usually used as buttons) can obviously have focus, so they are used as the main container for an input field. Below the Item, use a Panel to define the area where text input is to be displayed. Then, below that Panel, use "If Focused" as a conditional that determines whether the Item displays just the entered text or a TextInput widget allowing more input, such as:

Code:
Item
|-Panel
  |-If Focused
    |-Branch true
    | |-<code to display the TextInput widget>
    |-Branch else
      |-<code to use Text widget to display text entered so far>
This way, only the input field that has focus will accept input while typing. Of course, you'll want to highlight the one w/focus somehow to indicate what field is active. The default STV also uses a blinking cursor for an active input field.

If you have mutiple input fields plus other buttons that could have focus, a variable could be added that remembers the last input field that had focus, so at least one input field is active no matter what item has focus.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #2  
Old 06-22-2006, 11:57 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
This reminds me:

There is a way to handle focus for a TextInput widget, which allows the use of multiple text input fields to be on the screen at once.

Item widgets (usually used as buttons) can obviously have focus, so they are used as the main container for an input field. Below the Item, use a Panel to define the area where text input is to be displayed. Then, below that Panel, use "If Focused" as a conditional that determines whether the Item displays just the entered text or a TextInput widget allowing more input, such as:

Code:
Item
|-Panel
  |-If Focused
    |-Branch true
    | |-<code to display the TextInput widget>
    |-Branch else
      |-<code to use Text widget to display text entered so far>
This way, only the input field that has focus will accept input while typing. Of course, you'll want to highlight the one w/focus somehow to indicate what field is active. The default STV also uses a blinking cursor for an active input field.

- Andy
Thanks Andy, neat idea, I'll remember that for the future. Of course support in the Sage core would be even better ...


Dirk
Reply With Quote
  #3  
Old 06-22-2006, 12:10 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Even if it were in the core, you would have to have a way to specify whether or which TextInput widget should be active when some other button has focus (like I added while you were replying, it appears).

I don't know how often something like this is needed, but it worked pretty well when I had a use for it.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.