Whoops, replied to and from wrong email address:

Hi Brad,

It sounds like you have a 'use' problem.

Do you have a

use Wx qw( :everything );

Or something at the beginning of your program?

This should load the wxID_ANY styles and stuff.  There are subsets of
it which you are supposed to use, but I am too lazy to work out which.
 Mark has in fact written a program which will work out for each
program what you should load.  It's on the Wiki here:

http://wiki.wxperl.nl/w/index.php/WxEXPORTS

Good luck,

Regards

Steve

On Sun, Jan 20, 2013 at 8:53 AM, Brad Van Sickle <bvs7...@gmail.com> wrote:
> If i leave the single quotes off PERL complains that I "cannot use barewords
> when strict is enabled" (or something to that effect.
>
> I ended up figuring out that for some reason PERL is unable to map those
> "wxTE_xxxx" options to their values.    I had to dig into to the WX source
> code and find the actual hex values that they signify and use those.  Once I
> replaced "wxTE_Multiline" with 0x0020, everything began working...
>
>
>
>
>
> On 1/19/2013 7:41 PM, Steve Cookson wrote:
>>
>> Hi Brad,
>>
>> I haven't run your code, but from looking at it, you don't need the
>> single quotes or the brackets around the styles.
>>
>> Each style is just a function eg wxID_ANY just says,
>>
>> sub wxID_ANY {return -1};
>>
>> So it's not:
>>
>> ('wxTE_MULTILINE' | 'wxTE_READONLY' | 'wxTE_WORDWRAP' ),
>>
>> but,
>>
>> wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP,
>>
>> That should fix it,
>>
>> Regards
>>
>> Steve
>>
>>
>>
>>
>> On Fri, Jan 18, 2013 at 1:33 PM, Brad Van Sickle <bvs7...@gmail.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> I'm having some problems getting styles to take effect on a TextCtrl box.
>>> I'm using a TextCtrl to display the response to an HTTP request and it's
>>> getting written to the TextCtrl in one super long line.   I'd like to
>>> wrap
>>> the text and use all of the vertical space in the window.
>>>
>>> Here is how I'm creating my TextCtrl, but the styles simply don't seem to
>>> be
>>> taking effect.
>>>
>>> /    $self->{Response_Text} = Wx::TextCtrl->new($panel,    # parent//
>>> //                       6,                  # id//
>>> //                       "",                # label//
>>> //                       [100, 275],            # position//
>>> //                       [500, 400],       # text control size [width,
>>> height] //
>>> //                       ('wxTE_MULTILINE' | 'wxTE_READONLY' |
>>> 'wxTE_WORDWRAP' ),//
>>> //                      );/
>>>
>>>
>>> I've also tried to experimenting with wxTE_PASSWORD because it seemed
>>> like
>>> an easy way to test to see if I could get any styles to apply, but
>>> nothing
>>> seems to actually work.... any advice?
>
>

Reply via email to