BBC BASIC
« Moveable Tabs »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 10:46pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Moveable Tabs  (Read 104 times)
KenDown
New Member
Image


member is offline

Avatar




PM


Posts: 49
xx Moveable Tabs
« Thread started on: Feb 15th, 2018, 6:52pm »

I have created some tabs, following the method given in the Wiki. This appears to create a perfectly normal window which contains the tabs.

I would like to toggle the position of the tabs by clicking on a menu item, and thought that a simple SYS"SetWindowPos" using the handle returned by the tab creation routine would do the job, but the tabs remain stubbornly in place.

Can tabs be moved? Is SetWindowPos the right way to do it? Advice gratefully received.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Moveable Tabs
« Reply #1 on: Feb 15th, 2018, 8:15pm »

on Feb 15th, 2018, 6:52pm, KenDown wrote:
I have created some tabs, following the method given in the Wiki.

Unfortunately the term "tab" can mean different things. For example a 'tab' can mean a 'tab stop': a column in (for example) an edit control or a list box at which things are aligned. A 'tab' can also mean a 'tab control', which is analogous to the dividers in a notebook or the labels in a file cabinet.

I cannot tell from your message which kind of "tab" you are talking about, and although you refer to "the method given in the Wiki" there is no link which would provide the answer. Please clarify.

Richard.
User IP Logged

KenDown
New Member
Image


member is offline

Avatar




PM


Posts: 49
xx Re: Moveable Tabs
« Reply #2 on: Feb 15th, 2018, 8:45pm »

Sorry. It's the "tab control"
http://bb4w.wikispaces.com/Creating+a+tab+control

I have three tabs set and, depending on user input, I want to move all three a certain distance to the left or back again to the original position.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Moveable Tabs
« Reply #3 on: Feb 16th, 2018, 02:33am »

on Feb 15th, 2018, 8:45pm, KenDown wrote:
I want to move all three a certain distance to the left or back again to the original position.

If you've tried the 'obvious' ways and they don't work, that probably means you can't. But you might want to check that you really are using window handles: the BB4W libraries are rather inconsistent in how you find the window handle of a control (for example WINLIB5 returns window handles directly, but WINLIB2 doesn't).

Richard.

User IP Logged

KenDown
New Member
Image


member is offline

Avatar




PM


Posts: 49
xx Re: Moveable Tabs
« Reply #4 on: Feb 16th, 2018, 08:48am »

Thanks - that point about WINLIB2 and 5 was something I hadn't realised before!

Actually, after a night's sleep I looked at it again and discovered that I had left off a "0," and once that was in, it all worked properly. Sorry to have troubled you.

So for the record, you *can* move tab controls around (and the associated dialog boxes - if any - move with them) using "SetWindowPos" and the handle returned by the creation routine. However if you want to vary the number of tabs, you have to close the window and recreate it with the required number of tabs.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls