Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Basic4ppc Wishlist
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Basic4ppc Wishlist Missing any feature?


Horizontal Scroll Bars


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-30-2008, 03:02 PM
Dave Mitchell's Avatar
Newbie
 
Join Date: Mar 2008
Posts: 8
Default Horizontal Scroll Bars

As a new B4PPC owner, I am looking forward to writing some code. I am trying to display text in a multiline textbox, but I don't want the text to wrap. Is there a way to active a horizontal scroll bar in place of wrapping the text?

Thanks, dave
Reply With Quote
  #2 (permalink)  
Old 03-30-2008, 03:26 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Yes - using Erels' new door library. Door library (Beta) - Special library

Example attached. The library enclosed is a beta, look out for the final version to replace it with.
Attached Files
File Type: zip SBdemo.zip (3.8 KB, 25 views)
Reply With Quote
  #3 (permalink)  
Old 03-31-2008, 11:35 PM
Dave Mitchell's Avatar
Newbie
 
Join Date: Mar 2008
Posts: 8
Default

Excellent, thank you so much. Is there documentation on the door library? I poked around the Microsoft site but clearly don't know what I am looking for -> Thanks agraham, I found it on your post in the door library thread "If anyone wants to play but doesn't know how to find the necessary information the .NET 2.0 Class Library docs are here http://msdn2.microsoft.com/en-gb/lib...35(VS.80).aspx"

I was also looking for a way to find installed fonts. I can get the font filenames (cour.ttf, etc.), but not the name to pass to the setfont routine (Courier) -> I may have found it in the door lib as fontFamilies(j).Name, I'll see if I can get it to work.

Thanks again for the time you took answering my question.

Dave

Last edited by Dave Mitchell : 03-31-2008 at 11:44 PM.
Reply With Quote
  #4 (permalink)  
Old 04-13-2008, 04:20 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 422
Default

The door library is growing to a huge gate
This library tied in to the IDE would probably allow selection of
properties and events for given controls within the IDE while
the compiler wraps the "door" into the executable.
Well, atheoretical thought, I'm not a C programmer.
Reply With Quote
  #5 (permalink)  
Old 04-13-2008, 08:52 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

I'm afraid that things don't work that way Robert. There is nothing that this library can do that could not be done more efficiently at design/compile time in the IDE should Erel choose to implement it.

This library is of use only at runtime. It takes advantage of a .NET feature called "reflection". Basically every .NET "assembly" (dll or exe) carries a description of what it includes in a set of "metadata" within itself. This metadata can be accessed by a program at runtime to find out what objects, methods and properties are included in the assembly. By this mean new objects from that assembly may be instantiated and the methods and properties of those existing and new objects accessed.

This can be loosely described as "dynamic programming" or "late binding" and it comes with a performance cost as rather than being tightly bound and efficiently pre-compiled this library has to search for each property and method before invoking it, and that invocation has to do further work to coerce the arguments of that method or property call into the correct type. This comes at quite a cost in performance so is better suited for one-off types of access such as defining a controls' style rather than e.g. incrementing a property in a loop.

The above barely touches on a large subject and the knowledgeable could quibble with the huge simplifications I've made in the above description, but in the context of the use of this library it is largely accurate.
Reply With Quote
  #6 (permalink)  
Old 04-13-2008, 12:27 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 422
Default

Sacrificing performance is painful in more ways than one.
Nevertheless, the door library is a great performer in applications
where, say, 2 or 3 controls need additional properties.

I used your example of adding a horizontal scroll bar and text wrap
control to my Text Editor and, oh boy, it looks much more professional
with just four more short lines of code.

Thanks so much for your kind, comprehensive tutorial, Andrew.
Reply With Quote
  #7 (permalink)  
Old 04-13-2008, 02:57 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,219
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
Originally Posted by Dave Mitchell View Post
I was also looking for a way to find installed fonts. I can get the font filenames (cour.ttf, etc.), but not the name to pass to the setfont routine (Courier)
Some what belatedly I attach a bit of code showing how to display a Font Selection Dialog and assign the chosen font to a control. This only works on the desktop and of course needs the Door library. My example in the Door thread Door library (Beta) - Special library has a Font object example.
Attached Files
File Type: sbp FontDialog.sbp (1.0 KB, 4 views)

Last edited by agraham : 04-13-2008 at 03:38 PM.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scroll Bar bug in IDE agraham Bug Reports 2 10-07-2007 04:28 PM
Scroll bar EdQas Portuguese Forum 2 09-01-2007 06:46 AM
Scroll bar on Table control HARRY Questions & Help Needed 1 05-11-2007 09:08 AM


All times are GMT. The time now is 05:46 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0