LB Booster
« Strange Button behavior »

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



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 2  Notify Send Topic Print
 hotthread  Author  Topic: Strange Button behavior  (Read 85 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Strange Button behavior
« Reply #21 on: Nov 2nd, 2016, 11:29pm »

on Nov 2nd, 2016, 9:42pm, RobM wrote:
As stated previously it isn't a problem for me or my users. More of a curiosity.

But it wasn't you who raised the issue, and the OP (Alincon) may feel differently - unless of course you're one in the same person!

What this really illustrates is a flaw in the way Liberty BASIC is designed (and I'm not taking a pop at Carl; he had no way of knowing that Microsoft would introduce animated transitions). Conventionally one would create a control, like a button, with the required font initially selected; that way nothing untoward would happen. But in LB you can only specify the font you want after the control (and indeed its parent window) has been created, so necessarily it involves a switch from one font - the default - to another.

It's this font change that triggers the animation, and Microsoft could reasonably claim that you would not do that 'unnecessarily'. But the design of LB forces you to, and Windows detects this as a potentially 'visible' change (indeed it is) and tries to make it more interesting.

In a perfect world you'd choose the font when the control is declared, perhaps as an extra parameter to the BUTTON statement. But that's not how LB works (and, no, I don't intend to provide it as an LBB extension!).

Richard.
User IP Logged

Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Strange Button behavior
« Reply #22 on: Nov 2nd, 2016, 11:57pm »

This strange effect may be due to some intricacy in Windows 7.
But why do I not see it when I run the same programs in LB4.04 and 4.5?

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Strange Button behavior
« Reply #23 on: Nov 3rd, 2016, 02:57am »

on Nov 2nd, 2016, 11:57pm, Alincon wrote:
This strange effect may be due to some intricacy in Windows 7.

Now we understand it, to a degree, I don't think it can any longer be described as "strange"! What I see here, at least, is a perfectly ordinary transition animation.

Quote:
But why do I not see it when I run the same programs in LB4.04 and 4.5?

Obviously I am not privy to the internal workings of LB 4, only Carl knows those details. But one possible explanation is that LB 4 does not enable Version 6.0 Common Controls in its manifest, and it may be that some of these animation effects are dependent on that setting. But there could be many other reasons; as I've said, Windows is enormously complex.

Richard.
« Last Edit: Nov 3rd, 2016, 03:13am by Richard Russell » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Strange Button behavior
« Reply #24 on: Nov 3rd, 2016, 9:42pm »

The most straightforward workaround, to create an 'invisible' dummy button as the first item in the window - which can be animated as slowly as Windows wishes - seems to be effective on my Windows 7 PC:

Code:
    nomainwin
    button #student, "", [], UL, WindowWidth, 0
    button #student.btn6, "Get Student", [getStudentFile], UL, 100,50  
    open "Student File Maintenance" for window as #student
    #student "font Microsoft_Sans_Serif 10"
    #student "trapclose [studentEnd]" 
    #student.btn6 "!setfocus"
    wait
    
[studentEnd]
    close #student
    end 

Richard.
« Last Edit: Nov 3rd, 2016, 11:17pm by Richard Russell » User IP Logged

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


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