LB Booster
« type mismatch on stylebits »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:31am



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.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: type mismatch on stylebits  (Read 722 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: type mismatch on stylebits
« Reply #4 on: Jun 13th, 2016, 01:42am »

Yes, data statements might work, but wouldn't it be simpler to just code one stylebits statement for every text box?

What I really want is a new control: a 'numberbox' It would be similar to a text box, but only accept 0 - 9, decimal and minus.
Or maybe add an optional parameter to the textbox to only accept numbers.
I notice quite a few messages on the LB side with elaborate code to limit textbox input to only numbers. Maybe a 'numberbox' would be popular with those programmers, too.

r.m.
User IP Logged

RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx Re: type mismatch on stylebits
« Reply #5 on: Jun 13th, 2016, 11:02am »

on Jun 13th, 2016, 01:42am, Alincon wrote:
Yes, data statements might work, but wouldn't it be simpler to just code one stylebits statement for every text box?

What I really want is a new control: a 'numberbox' It would be similar to a text box, but only accept 0 - 9, decimal and minus.
Or maybe add an optional parameter to the textbox to only accept numbers.
I notice quite a few messages on the LB side with elaborate code to limit textbox input to only numbers. Maybe a 'numberbox' would be popular with those programmers, too.

r.m.


LBB has a quite simple solution to a "Numberbox" which allows calculator type entry of 0-9, "-" and "." into a textbox.

If you don't want calculator type entry, just use the sub at the end of the code (num$())

http://lbb.conforums.com/index.cgi?action=display&board=lblang&num=1462715049&start=15

Hope it's of use.
User IP Logged

RNBW
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 106
xx Re: type mismatch on stylebits
« Reply #6 on: Jun 13th, 2016, 11:17am »

on Jun 12th, 2016, 4:37pm, Alincon wrote:
However, I have some other parts of the program where the textboxes are not aligned horizontally and/or vertically.
Any suggestions on how to handle that situation?

r.m.


If Richard's suggestion doesn't meet requirements, he provided a lot of guidance on the use of maphandle with grids of textboxes at
http://lbb.conforums.com/index.cgi?board=lblang&num=1427909734&action=display&start=0

It may be worthwhile having a look at this. I know a lot of the code will not be of use but you might pick up something that helps with your problem. The code provided does not result in any misalignment vertically or horizontally.

Hope it's of use.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: type mismatch on stylebits
« Reply #7 on: Jun 13th, 2016, 11:24am »

on Jun 13th, 2016, 01:42am, Alincon wrote:
Yes, data statements might work, but wouldn't it be simpler to just code one stylebits statement for every text box?

I assumed you had a large number of boxes and wanted to avoid the long-winded LB solution of a separate STYLEBITS and TEXTBOX statement for each one. In that case creating the boxes in a loop with DATA statements for the positions and sizes is more efficient.

But if you don't mind using the traditional LB method, with each box declared individually, of course that's fine too.

Quote:
What I really want is a new control: a 'numberbox' It would be similar to a text box, but only accept 0 - 9, decimal and minus.

A 'numberbox' already exists as far as the entry of unsigned integers is concerned (i.e. just the digits 0 - 9) - specify the _ES_NUMBER stylebit - but it doesn't accept either a minus sign or a decimal point.

Richard.
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