Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 11th, 2024, 10:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Listbox, Text Selection Style
PostPosted: April 8th, 2010, 4:23 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Hi,

Is there a way to may the text style color transparent, currently you appear to be limited to a specific color. Is it possible to do this via scripting either?

Thanks.

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


For this message lmc has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 8th, 2010, 7:27 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Yes.
It is easy. ( OpusPro has such great toolkit and features )
Just add the Transparency Effect. Find it under object Properties >>> Effects tab. Voila! Done.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 8th, 2010, 8:37 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
BTW, that Transparency can be applied by using the Slider in the Toolbar.

Oh, another way to get there is to apply a Fade animation/action. Could trigger it OnShow and make it immediate, or can manipulate that many different ways. Scripting not needed.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 12th, 2010, 11:17 am 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Thanks Lar,

Looking at doing it through scripting. Will work on it again today and update on what I get.


Thanks

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


For this message lmc has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 12th, 2010, 6:59 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Should have put this request in the Advance section.

I have a Listbox and when an item is clicked, I want the selected text to be deleted, I was going to SetSelectionStyle to transparent, but this script option doesn't appear to be an option.

Alternative is to delete from Array and pull Listbox contents back in again.

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


For this message lmc has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 12th, 2010, 10:43 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Imc,

Quote:
Should have put this request in the Advance section
Ah well, it's here... we'll work it here :)

Quote:
when an item is clicked, I want the selected text to be deleted, I was going to SetSelectionStyle to transparent
Alternative is to delete from Array and pull Listbox contents back in again.

I think your choice here can be based on what you want the User experience to be: see a 'blank' line, or see a compressed list.

If you are pursuing the 2nd option, you would not need to do array element deleting. You can simply locate the listbox line or the beginning and ending character indices for that Listbox SELECTION --- and then ReplaceSelectionText() with "". (actually I think the boundaries might be beginning of one line to the beginning of the next if you want to delete the 'carriage return'... you can play with it to leave a blank line or remove that blank line). (see 'tickbox' mention below)

As for the 1st option, you have to deal with two parts of the challenge. Text style for the normal displayed entry, and text style for the item selection.
-- The latter is governed by the Listbox object Properties... Selection Font. Simply customize the Selection Style to apply a Text Colour that matches the Listbox's background colour ( "FFFFFF" for white ), and then do the same for the Background (i.e., highlighting). While in that dialogue, uncheck all the formatting options for Bold, underline, etc.
-- The first part is how to modify the appearance of an entry once selected. Again, I think you identify the 'line' or the SetSelection() and change the style/font colour to match LB background ("FFFFFF" or other). (this governs one entry line when it is later not selected).

BTW, there is some code you can adapt for either of the two optional approaches... search for 'listbox' and 'tickbox'
The scripts identify a Listbox selection and change the leading characters of a line so that it appears as if the User checked/unchecked a checkbox. The principal is the same.

Hey, if you go that route and modify it... please Post back here/elsewhere with your solution. I'd like to see the old scripts streamlined with 'switch' and 'case' commands.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Listbox, Text Selection Style
PostPosted: April 13th, 2010, 11:44 am 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Thanks again Lar as always you have great insight.

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


For this message lmc has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 21 guests


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 © 2000, 2002, 2005, 2007 phpBB Group