|
Post by Ronnie on May 20, 2018 10:41:19 GMT -5
Hi - Is there a way to do TabControl in Liberty Basic? I saw an example on Alyce's Restaurant, but it would not run on LB 4.5.1. I get an error for this line:
'initialize DLL calldll #comctl32, "InitCommonControls", ret as void
Thank You...
|
|
|
Post by Rod on May 21, 2018 7:13:03 GMT -5
Why not hop over to the LBPE, Tabstrip demo works for me. Alyce has ported a lot of stuff to the LBPE and updated it. The demo runs for me, so what exact error message are you getting when Liberty halts? Try it with the debugger too.
|
|
|
Post by Ronnie on May 22, 2018 6:52:19 GMT -5
Hi Rod - Thank you for getting back to me. I have been trying to use the Tabstrip demo without too much success. I just tried it again and get two errors:
1 - dim tab(3) 'hold tab window handles in array Bad array name
2 - TCITEM.pszText$.struct = "Third Tab"+chr$(0) Runtime error: undefined struct: TCITEM
In the past I also got an error for (see below) but I don't recall what it said.:
calldll #comctl32, "InitCommonControls", ret as void
Thank you... Ronnie
|
|
|
Post by metro on May 22, 2018 8:16:08 GMT -5
This works for me.... Tabs
|
|
|
Post by Janet on May 22, 2018 10:38:14 GMT -5
Hi Rod - Thank you for getting back to me. I have been trying to use the Tabstrip demo without too much success. I just tried it again and get two errors: 1 - dim tab(3) 'hold tab window handles in array Bad array name 2 - TCITEM.pszText$.struct = "Third Tab"+chr$(0) Runtime error: undefined struct: TCITEM In the past I also got an error for (see below) but I don't recall what it said.: calldll #comctl32, "InitCommonControls", ret as void Thank you... Ronnie I ran the code as is from LBPE and had to make one modification: the code was written prior to 'tab' being a native LB function, so you can no longer use it as a variable name. I renamed all instances of 'tab' to 'xtab' (you can use whatever variable name you like) and the code worked flawlessly. Not sure why you were getting the undefined struct error. Did you copy and paste the entire code?
|
|
|
Post by Ronnie on May 22, 2018 12:02:13 GMT -5
Hi Janet - Thank you for your email. I changed the "tab" to "xtab," and it still will not work. I get the following errors: Error log timestamp Tuesday 05/22/18 12:56:23 PM
OS Warning: Invalid menu handle.
Error log timestamp Tuesday 05/22/18 12:56:23 PM
OS Warning: Invalid menu handle.
Error log timestamp Tuesday 05/22/18 12:56:23 PM
OS Warning: Invalid menu handle.
Error log timestamp Tuesday 05/22/18 12:56:26 PM
Runtime error: invalid device handle: #xtab1 Thank you... Ronnie
|
|
|
Post by Rod on May 22, 2018 13:29:01 GMT -5
OK, I am beginning to wonder if we are all seeing the same LBPE as I am. Remember we have being making changes to the host. On the LBPE I am looking at there is no "Dim Tab(3)" statement anywhere. The demo code at the foot of the page runs without error or needing any amendment. The update code uses wintab() as an array. It also defines the struct correctly and finds that struct without error. So something is up. Use this link lbpe.wikispaces.com/TabStrips see if the demo code at the foot of the tutorial runs for you. If not please copy cut and paste the demo back here so we can see what you are getting.
|
|
|
Post by Janet on May 22, 2018 16:40:25 GMT -5
OK, I am beginning to wonder if we are all seeing the same LBPE as I am. Remember we have being making changes to the host. On the LBPE I am looking at there is no "Dim Tab(3)" statement anywhere. The demo code at the foot of the page runs without error or needing any amendment. The update code uses wintab() as an array. It also defines the struct correctly and finds that struct without error. So something is up. Use this link lbpe.wikispaces.com/TabStrips see if the demo code at the foot of the tutorial runs for you. If not please copy cut and paste the demo back here so we can see what you are getting. Aha! My LBPE search led me to the newsletters, specifically newsletter #108. You're right. The code you linked to above works for me exactly as posted.
|
|
|
Post by Rod on May 23, 2018 6:57:51 GMT -5
Good, I hope Ronnie makes some progress now.
|
|
|
Post by Ronnie on May 23, 2018 8:19:21 GMT -5
Good, I hope Ronnie makes some progress now. Janet / Rod - Thank you... Its a small world, I was using the older demo. Now it works, and again thank you...
|
|
ernie
New Member
Posts: 44
|
Post by ernie on Mar 6, 2021 8:24:26 GMT -5
Hello!
running LB Pro 4.51
the code:
open "YourProgram" for window_popup as #RegionWindow
and the code:
open "" for window_popup as #tab1
Both result in "OS Warning: Invalid menu handle." being written to the error.log Other than this, the code seems to run fine.
This error also occurs when I run the tabstrips demo formerly on wikispaces, referenced above. I have tried renaming the handles without success. This problem does not happen when the code is compiled.
can I ignore this error report because it does not occur when compiled? The code is meant for eventual distribution and will be compiled.
Thanks for any help you can offer...
Ernie
|
|
|
Post by Rod on Mar 6, 2021 9:09:07 GMT -5
You can ignore the error log report it is a known bug.
|
|
ernie
New Member
Posts: 44
|
Post by ernie on Mar 6, 2021 9:37:21 GMT -5
Thanks, Rod.
The help received here is greatly appreciated.
Ernie
|
|
|
Post by Walt Decker on Mar 12, 2021 8:59:47 GMT -5
|
|
ernie
New Member
Posts: 44
|
Post by ernie on Mar 14, 2021 0:30:28 GMT -5
Thanks, Walt.
|
|