Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 8:59 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: EditBox
PostPosted: Wed Apr 01, 2009 1:33 pm 
Offline
User avatar

Joined: Fri Feb 01, 2008 4:50 pm
Posts: 101
For a particular screen I am working on, I need to be able to make an editbox inactive, as you might do with a button or a label. Unfortunately, the editboxv2 template does not have any "inactive"-like functionality built into it, and furthermore, the editboxv2 simply extends the coreeditbox template, so I cannot easily add this feature myself. I might be able to extract coreeditbox from a qlib, but is there no other way? Is there any plan to standardize the object interfaces, because it seems like there is some disparity between what each supports?

Thanks!


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Wed Apr 01, 2009 1:37 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
The editbox has slightly more fine grained control than simply inactive or not. The EditType property controls what you can do with it. You probably want eb_readonly or eb_readonly_scroll depending on whether your editbox will scroll.

You are right in noticing that the objects do not all have the same capabilities. This is something we plan to address in Qlarity 3.0

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Thu Apr 02, 2009 10:12 am 
Offline
User avatar

Joined: Fri Feb 01, 2008 4:50 pm
Posts: 101
That's essentially what I needed. The only improvement would be to have the box grayed out when inactive (or read-only). Thanks!!

Ryan


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Mon Apr 06, 2009 8:23 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Assuming you are using the standard colors in your workspace, this little function added to the edit box will gray out the text reasonably well:
Code:
func Edittype(newVal as ebreadWrite_type)
    default(newVal)

    if editType == eb_ReadWrite then
        fgColor = clr_buttonforeground
    else
        fgColor = 110
    endif
endfunc

Change the colors as desired. It won't, give you the 3d sunken look that the other controls use though

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Fri Apr 17, 2009 12:52 pm 
Offline
User avatar

Joined: Fri Feb 01, 2008 4:50 pm
Posts: 101
Great, thanks Jeremy!

I do have one other question about the EditBox. I am using one to display a log of communication activity, but I'm not sure what will happen when it reaches it's maximum number of lines. If I do a force append, and the number of lines is already at the maximum, will the oldest line be removed? This would be the optimal solution, as I don't want it to gobble up all the memory if the terminal is on for a long time.

Thanks!

Ryan


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Fri Apr 17, 2009 1:06 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Yes -- force append removes the top line(s) and replaces it with the new one(s). For logging, forcing append is what you want to do.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Fri Apr 17, 2009 2:16 pm 
Offline
User avatar

Joined: Fri Feb 01, 2008 4:50 pm
Posts: 101
Thanks for the quick response.

One more question on the editbox. When the editbox loses focus, it scrolls all the way back to the top. Is there a way to keep it where it was before it lost focus?


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Fri Apr 17, 2009 2:43 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
That looks to be a bug in the EditBox object. I've fixed that for our next release. If you like to get the fix early, I've put some beta libraries here for download:
http://www.qsicorp.com/engfiles/bleedin ... uild_3.zip

You'll probably want to use Qlarity Foundry 2.60 or better with these libraries, and you'll need to unzip them into the directory where QF is installed overwriting existing files.

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject: Re: EditBox
PostPosted: Fri Apr 17, 2009 2:53 pm 
Offline
User avatar

Joined: Fri Feb 01, 2008 4:50 pm
Posts: 101
Awesome, thanks Ron!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group