April 29, 2024, 02:19:23 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


IBCleanUp written in EBasic

Started by billhsln, February 24, 2008, 02:00:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Since you are using a dialog you have to remember that controls don't exist until until after the dialog is opened.

Therefore, the correct place would be to put it in @IDINITDIALOG

I think you might not be using SETFONT correctly.

Show me the line you are using.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

I do have it right after the INIT.  I tried it in lots of strange places.  Note, this not exactly the font I want, I just tried it to make it easy to see and stand out.


SUB d1_handler
SELECT @MESSAGE
CASE @IDINITDIALOG
CENTERWINDOW d1
SETFONT d1,"Courier New",15,700


I have also tried SETFONT d1,"Courier New",15,700,0  Neither seems to make any difference.  I want to have a fixed pitch font, so the File Size will line up in the ListView.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

SETFONT d1,"Courier New",15,700 sets the font for the dialog itself.
What you are really wanting to do is set the font of the listview with:
SUB d1_handler
SELECT @MESSAGE
CASE @IDINITDIALOG
CENTERWINDOW d1
SETFONT d1,"Courier New",15,700,D1_LV


Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

ops,
left out a parameter.
Should beSETFONT d1,"Courier New",15,700,0,D1_LV

Sorry about that.

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

Changed to:  SETFONT d1,"Courier New",10,400,0,D1_LV  this works perfectly on setting the listview's font.

I tried:  SETFONT d1,"Neuroscope",12,400   a really wild font.  You said that it would define the entire dialog with that font.  It did not work for me.

Any ideas?  I will use the first one to set the ListView's font, but would just like to know how to change the one for the entire Dialog (mostly as a FYI for me).

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

Quote from: billhsln on February 28, 2008, 09:15:42 PM
...You said that it would define the entire dialog with that font.  It did not work for me.
I've got to pull a Bill Clinton on you; "It depends on what 'is' is".

I saidSETFONT d1,"Courier New",10,400will change the font for the dialog. (I didn't use the word "entire".)
If you have that code in the initdialog section then you changed the font of the dialog which is the parent window of your application.

I just looked through your code again and nowhere do I see where you are writing to the dialog itself( which would look likePRINT d1, A$but I don't think you can do that with a dialog anyway; only a window.

So, you'll have to set the font of each control (which is actually a child window of your parent, d1)

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

I see, like I said, I am a newbie, just learning how things work.  Thanks for the explanation.  Now it makes a lot more sense.  CONSOLE mode sure is a lot easier to follow compared to Windows.

I already implemented pistol350's changes.  There is now a column with file size and the bottom line gives total Bytes.  Now I am going to start working on the changes you suggested.

I can't wait till I get my copy of the EBasic manual.  Hopefully it will better explain how things work.  Just my luck, I will be out of town for the week when it will arrive at my house.

Thanks for all the help,
Bill
When all else fails, get a bigger hammer.

billhsln

Here is the latest version.  I think I have implemented the changes suggested by Larry McCaughn and Pistol350 with maybe a few modifications on my part.

Hopefully some one will find this program of use and maybe it will help some one else with their programming efforts.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Hey, Bill,

Works a treat now with the new modifications - well done

Brian

billhsln

I only hope I did not mess something else up.

Thanks Larry....

Bill
When all else fails, get a bigger hammer.

pistol350

Regards,

Peter B.