![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Topic: highlightingPosted: January 06 2010 at 7:01am |
|
I need to allow a user to right click on data they have entered, have a menu popup and allow them to change the color of their highlighted data and save it. I see how to allow them to right click and allow them to change the color.
But I do not know how to find out what test they have highlighted. Any ideas out there? Michael |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 12:44am |
|
I have read the programmers guide and cannot find anything relating to how to get highlighted data fromn the user. Is there anyone that knows anything about that?
Michael |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 3:15am |
|
Hi Michael -
You cannot access the highlighted text directly, but you can get the start and length of the highlight. Use the GPSELSTART and GPSELLENGTH properties of the Edit control, then just take a substring of the text. Thanks, Pete |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 3:28am |
|
Pete,
I tried that but GPSELLENGTH & GPSELSTART always show the same values not= matter what is selected: CALL ATGUIGETVALUES("DAILY.BILLREC","MAIN","txtBrenda",VAL,GUIERRORS,GUISTATE);*GET ACCTG NOTE print GPSELLENGTH PRINT GPSELSTART Michael |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 3:34am |
|
Ok, I used ATGUIGETPROP and it works - thanks Pete!!
Michael |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 6:48am |
|
Pete,
Ok, one thing I forgot and am having touble getting it to work. How do I now put the text back on the screen with some of it highlighted in color. (i.e. the test the user highlighted.) That will make it permanent - so it can be stored. Michael |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 7:14am |
|
Pete,
I now see that I can highlight text using GPFORECOLOR but still cannot get just the user selected text to highlight... Michael |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 8:42am |
|
Hi Michael -
The highlight color used for selections is not a property you can set - its a global Windows setting. To set the highlight is just the opposite of getting the highlight - just set the GPSELSTART and GPSELLENGTH properties after setting the GPVALUE property with the full text. Thanks, Pete |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 07 2010 at 11:41pm |
|
Thanks for the info Pete! That works however, the highlighting goes away if I click on anything else and I cannot set the color of the highlight. I need to save the highlighted info for reading later. I am
1) loading values 2) setting GPSELSTART 3) setting GPSELELNGTH Your help is GREATLY Appreciated! Michael |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: January 08 2010 at 2:23am |
|
Hi Michael -
You cannot set the color of the highlight, except by setting the display properties in Windows itself. The highlight is used to denote a selection in the text box, and not generally useful for simply highlighting a word or phrase. Clicking in a text box removes the selection - just like any other Windows text box. You might be able to disable the text box so that it does not respond to clicks - I'm not sure if that would clear the selection or not. Thanks, Pete |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 11 2010 at 12:22am |
|
Thanks Pete,
Too bad we cannot have a user highlight in color. I will try disabling the text box. Michael |
|
![]() |
|
mlucas67
Senior Member
Joined: February 12 2007 Location: United States Status: Offline Points: 103 |
Post Options
Thanks(0)
Quote Reply
Posted: January 20 2010 at 1:30am |
|
Sounds like what you are really after is what is called an RTF Textbox (Rich Text Format). In VB it allows you to bold, italicize, change color, etc of portions of text just like a word processor (Word) would do. You could write your application in full VB and still use Accuterm as your connection using the .NET wrappers. Then you would have the full VB toolbox of controls.
It would be nice to have a full toolbox, but most of us are just trying to move from green screen into GUI so we didn't have such features to begin with.
Marshall
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: January 20 2010 at 10:26am |
|
Hi Michael -
If the field is display-only, AccuTerm 7 has a new "html viewer" control. You can format the text using html tags and load it into the html control. But it would be for display only, not editing. Thanks, Pete PS: AccuTerm coming soon! |
|
![]() |
|
rmichaelfrank
Groupie
Joined: March 20 2008 Location: United States Status: Offline Points: 40 |
Post Options
Thanks(0)
Quote Reply
Posted: January 20 2010 at 10:52pm |
|
Thanks Pete, yes that is all I need at this time - a viewer. I will be waiting for version 7!
Thanks. Michael |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |