PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: tabs within a form  (Read 717 times)

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
tabs within a form
« on: February 14, 2017, 07:05:54 PM »

Having set the tab order of controls on a form in the form designer, is it possible to get/set the tab numbers of the controls, so that I can tab to the next control on the form, within software? If so, how? I can tab around OK using the tab key on keyboard, but would like to do that from a button on another form.Thanks.
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8090
  • Windows 10
    • PlanetSquires Software
Re: tabs within a form
« Reply #1 on: February 14, 2017, 08:30:46 PM »

You would need to use the GetNextDlgTabItem api. https://msdn.microsoft.com/en-us/library/windows/desktop/ms645495(v=vs.85).aspx if you want to programmically move from control to control within the tab order.

If you want to manually set focus to a control, then, well, you'd use the SetFocus api or the FF_CONTROL_SETFOCUS wrapper.
« Last Edit: February 14, 2017, 08:33:46 PM by TechSupport »
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: tabs within a form
« Reply #2 on: February 16, 2017, 06:50:15 PM »

Thanks for the link. It does what I wanted to do, but not as described 'on the tin', so to speak. Interesting that their explanation is flawed, in as much as null is allowed for second entry. I've also found that the third value 'bPrevious' (true/false) is inverted - e.g. false is for previous tab. It may be that there is a difference between how true is implemented by c++ cf  freebasic e.g., if true is one, and false is zero, then if in their code they have false as not true, that can be different than true being not false, depending on the 'not' and how much of the assigned 8 bits are used, or maybe they've just described it incorrectly. Anyway, other than that, two errors in three, that's too bad... ;)
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8090
  • Windows 10
    • PlanetSquires Software
Re: tabs within a form
« Reply #3 on: February 16, 2017, 11:30:10 PM »

Are you sure that you have your TAB order correctly set to begin with using the FireFly Tab Order listbox?
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor

raymw

  • FireFly3 User
  • Junior FireFly Member
  • *
  • Posts: 64
Re: tabs within a form
« Reply #4 on: February 17, 2017, 10:35:56 AM »

I was sure, very sure, in fact, hence my posting here, I had initially checked a number of times, but I now see that indeed the order was reversed. I'll go and stand in the naughty corner. :(
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8090
  • Windows 10
    • PlanetSquires Software
Re: tabs within a form
« Reply #5 on: February 17, 2017, 11:44:27 AM »

:)  lol

We all get sent to the naughty corner every now and again.

Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor