knowledge-database (beta)

Current group: comp.soft-sys.wxwindows

Question about wxHtmlEasyPrinting and wxListCtrl

Question about wxHtmlEasyPrinting and wxListCtrl  
Sirius
 Re: Question about wxHtmlEasyPrinting and wxListCtrl  
Sirius
 Re: Question about wxHtmlEasyPrinting and wxListCtrl  
Gunnar Roth
From:Sirius
Subject:Question about wxHtmlEasyPrinting and wxListCtrl
Date:Fri, 21 Jan 2005 07:42:46 +0000 (UTC)
row) on everypage. What I did
is create another html-table with 1 row which contain the column
header and set it as the header.

But this header is a bit far from my data-listing. And the column size
may different when user key in some long text in data field. :(

Anyone got a better solution for this? Thank in advance.


2) I use wxListCtrl in my application, when user click on it, certain
info will display in TextCtrl. Now I hope to a 'Goto row#' which allow
user jump to certain row. After searching in the list, I found what I
need:

[code]
nItem = my item number
m_lstRec->EnsureVisible(nItem);
m_lstRec->SetItemState(nItem,
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
wxLIST_MASK_STATE) ;
[/code]

But I dont see my ListBox is being selected and focused, since no data
is showed in my textctrl and my EVT_LIST_ITEM_SELECTED is not being
called. Is that anything which i missed? Thanks.

--
Thanks,
Sirius

wxMSW: 2.5.2
WinXP Pro, VC++ 6.0



---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org
Hello,

2 Question asking for help:

1)Recently I used wxHtmlEasyPrinting for my report printing,
wxHtmlEasyPrinting work nice and easy :)

But I cant show my column row (html
From:Sirius
Subject:Re: Question about wxHtmlEasyPrinting and wxListCtrl
Date:Sat, 22 Jan 2005 07:12:42 +0000 (UTC)
Hello Gunnar,

Friday, January 21, 2005, 4:11:30 PM, you wrote:
> ----- Original Message -----
> From: "Sirius"
> Sent: Friday, January 21, 2005 8:42 AM
>>
>> 2) I use wxListCtrl in my application, when user click on it, certain
>> info will display in TextCtrl. Now I hope to a 'Goto row#' which allow
>> user jump to certain row. After searching in the list, I found what I
>> need:
>>
>> [code]
>> nItem = my item number
>> m_lstRec->EnsureVisible(nItem);
>> m_lstRec->SetItemState(nItem,
>> wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
>> wxLIST_MASK_STATE) ;
>> [/code]
>>
>> But I dont see my ListBox is being selected and focused, since no data
>> is showed in my textctrl and my EVT_LIST_ITEM_SELECTED is not being
>> called. Is that anything which i missed? Thanks.

> YOu should do this:
m_lstRec->>SetItemState(nItem,
> wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
> wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED) ;

> The third parameter of SetItemState has to be a mask of the states you want
> to set or reset with the second state parameter,
> not wxLIST_MASK_STATE. This seems a bit weird. there is a wxListView class ,
> which has a more intuitive interface.

> regards,
> gunnar


Thank you very much, it is work. :-)

--
Thanks,
Sirius

wxMSW: 2.5.2
WinXP Pro, VC++ 6.0



---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org
From:Gunnar Roth
Subject:Re: Question about wxHtmlEasyPrinting and wxListCtrl
Date:Fri, 21 Jan 2005 08:12:50 +0000 (UTC)
row) on everypage. What I did
> is create another html-table with 1 row which contain the column
> header and set it as the header.
>
> But this header is a bit far from my data-listing. And the column size
> may different when user key in some long text in data field. :(
>
> Anyone got a better solution for this? Thank in advance.
>
>
> 2) I use wxListCtrl in my application, when user click on it, certain
> info will display in TextCtrl. Now I hope to a 'Goto row#' which allow
> user jump to certain row. After searching in the list, I found what I
> need:
>
> [code]
> nItem = my item number
> m_lstRec->EnsureVisible(nItem);
> m_lstRec->SetItemState(nItem,
> wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
> wxLIST_MASK_STATE) ;
> [/code]
>
> But I dont see my ListBox is being selected and focused, since no data
> is showed in my textctrl and my EVT_LIST_ITEM_SELECTED is not being
> called. Is that anything which i missed? Thanks.
YOu should do this:
m_lstRec->SetItemState(nItem,
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED) ;

The third parameter of SetItemState has to be a mask of the states you want
to set or reset with the second state parameter,
not wxLIST_MASK_STATE. This seems a bit weird. there is a wxListView class ,
which has a more intuitive interface.

regards,
gunnar




---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wx-users-help@lists.wxwidgets.org

----- Original Message -----
From: "Sirius"
To:
Sent: Friday, January 21, 2005 8:42 AM
Subject: Question about wxHtmlEasyPrinting and wxListCtrl


> Hello,
>
> 2 Question asking for help:
>
> 1)Recently I used wxHtmlEasyPrinting for my report printing,
> wxHtmlEasyPrinting work nice and easy :)
>
> But I cant show my column row (html
   

Copyright © 2006 knowledge-database   -   All rights reserved