Hi,
I'm just a beginner with FireFly (just testing the visual designer)
I've some questions :
1. I have a form with 3 TEXTBOX; I understand why I got a Control ID (prefixed by IDC_) for each textbox; but I 'don't understand why I got a Windows Handle (prefixed by HWND_) for each TEXTBOX on a simple form ? I should have only one Windows Handle ? why I got a windows handle for each textbox ?
2. To retrieve the text from a TEXTBOX I can use :
=> FF_CONTROL_GETTEXT (FireFly Function)
Or
=> CONTROL GET TEXT (PowerBasic Function).
What are the differences ? which function should I use ?
3. Do you plan to add auto-sizing for tabcontrol children form in a new version of FireFly ?
4. The default font is "Tahoma size 8" on FireFly; the default font is "MS Sans Serif 8" on PB Forms; what are the differences between these two fonts ?
Thank you for your help.
Jean-Pierre LEROY
Textboxes are child windows' of the form, and without the handle to them you wouldn't have any possibility to address them specificly. In VB it's as easy as txt_Surname.BackColor to alter the backcolor property, but in PB (not beeing Object Oriented) the handle is the controls (windows') name. That's how the API wants it anyway. All "things" are referred to with a unique handle/number given it at the time of creation.
To pick out the content of the textbox, you could even use the API. But FF's wrapper function(s) are there to make life easier and quicker when in FF. Less thinking, and more productivity. So, are you in for doing things the hard way, or the quick'n easy?!
As for the difference between Taoma and Ms Sans Serif, it's a little like asking whats the best of the mother and her doughter.. - You decide whom you'll choose to like better. It's all about your preferences. Personally I'm into "the mother" (in this case) as I'm used to her, and feel more familiar with her..
Quote from: Jean-Pierre LEROYI'm just a beginner with FireFly (just testing the visual designer)
Great to have you here. Ask as many questions as you wish. We'll all try to help as much as possible.
Quote1. I have a form with 3 TEXTBOX; I understand why I got a Control ID (prefixed by IDC_) for each textbox; but I 'don't understand why I got a Windows Handle (prefixed by HWND_) for each TEXTBOX on a simple form ? I should have only one Windows Handle ? why I got a windows handle for each textbox ?
Everything in Windows is a "window". A window can be a Form, a Control, a Menu, a StatusBar, etc... The operating system differentiates each window based on its "window handle". A window handle is nothing more than a dword/long value that uniquely relates to the window. You use that value whenever you want to manipulate the window. In most cases it is easier to use the handle (hwnd) rather than the control id (IDC_). You see, using the HWND of the control you can call the control directly. If you use the control ID (IDC_) then you also need to use the Form's HWND. PowerBASIC's DDT uses the HWND and IDC combination for every call. This can be cumbersome compared to just calling via the HWND. Once you get used to it, you'll never want to go back to the HWND and IDC combination method. :)
Quote
2. To retrieve the text from a TEXTBOX I can use :
=> FF_CONTROL_GETTEXT (FireFly Function)
Or
=> CONTROL GET TEXT (PowerBasic Function).
What are the differences ? which function should I use ?
Both will probably work but it is often easier to use the FireFly functions.
Quote3. Do you plan to add auto-sizing for tabcontrol children form in a new version of FireFly ?
I am not 100% sure that this will be in the 1.50 version, but it is on the FireFly wishlist ;)
Quote
4. The default font is "Tahoma size 8" on FireFly; the default font is "MS Sans Serif 8" on PB Forms; what are the differences between these two fonts ?
There is not much different between the fonts. FireFly picks up the default GUI font that is used by your specific version of Windows. I guess that PBForms may have hard coded the use of Sans Serif. In FireFly you can change the default font. Look under "Options", "Environment Options", "Default font for new controls".
Haakon and Paul,
Thank you very much for your answers.
Jean-Pierre