• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

delphi dxlayout focus on tabbed groups

the latest version of devexpress dxlayout allows you to create tabbed groups. my question is how to programmatically set focus in a specific tabbed group?
0
dinko1
Asked:
dinko1
  • 7
  • 3
  • 2
1 Solution
 
jimyXCommented:
You can try this:
((dxLayoutControl1ItemX as TdxLayoutItem).Control as TWinControl).SetFocus
0
 
ThommyCommented:
Check these links dealing with your problem...

Allowing to focus through tabbed groups
http://www.devexpress.com/Support/Center/p/DS61288.aspx

Can't focus control on tabbed layoutcontrol group
http://www.devexpress.com/Support/Center/p/B196036.aspx

DevExpress / Search for Keywords "focus tabbed group"
http://search.devexpress.com/?q=focus+tabbed+group&p=T0%7cP0%7c0&d=29
0
 
dinko1Author Commented:
none of the solutions work!
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
jimyXCommented:
How did you use that line? Can you show code please.
0
 
dinko1Author Commented:
jimmy I use Group and your example works on Items. I asked how to focus a tabbed GROUP not an item. the group object doesnt have a "Control" property.
0
 
ThommyCommented:
Have you checked the following link from my post above???

Can't focus control on tabbed layoutcontrol group
http://www.devexpress.com/Support/Center/p/B196036.aspx

Try it with "FocusHelper.PlaceItemIntoView"...

0
 
dinko1Author Commented:
yeap. that is a .NET (XtraLayoutcontrol). I asked for Delphi VCL LayoutControl.
Such property (FocusHelper) DOESNT exist
0
 
ThommyCommented:
Do you want to set focus to a specific control in a tabbed group or to the tabbed group itself???
0
 
dinko1Author Commented:
to the tabbed group itself.
0
 
dinko1Author Commented:
or the first component of the tabbed group. its the same
0
 
dinko1Author Commented:
i found a workaround.
all you have to do is:

1) hide all groups except the one you want to focus

dxLayoutGroup2.Visible := false;
dxLayoutGroup3.Visible := false;

2) and then set back to visible


dxLayoutGroup2.Visible := true;
dxLayoutGroup3.Visible := true;


this will give the focus to the 1st group dxLayoutGroup1
0
 
dinko1Author Commented:
i found my own solution
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 7
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now